xquery version "1.0" encoding "UTF-8";

(: This file was generated on Sun Feb 12, 2012 14:23 by REx v5.11 which is Copyright (c) 1979-2012 by Gunther Rademacher <grd@gmx.net> :)
(: REx command line: XQueryV30.ebnf.txt -tree -xquery :)

(:~
 : The parser that was generated for the XQueryV30.ebnf grammar.
 :)
module namespace p="XQueryV30.ebnf";

(:~
 : The codepoint to charclass mapping for 7 bit codepoints.
 :)
declare variable $p:MAP0 as xs:integer+ :=
(
  67, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7,
  8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
  29, 26, 30, 30, 30, 30, 30, 31, 32, 33, 30, 30, 30, 30, 30, 34, 30, 30, 30, 35, 30, 30, 36, 37, 38, 37, 30, 37, 39,
  40, 41, 42, 43, 44, 45, 46, 47, 30, 30, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 37,
  37
);

(:~
 : The codepoint to charclass mapping for codepoints below the surrogate block.
 :)
declare variable $p:MAP1 as xs:integer+ :=
(
  108, 124, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 156, 181, 181, 181, 181, 181, 214,
  215, 213, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214,
  214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214,
  214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214,
  214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 247, 261, 277, 293, 309, 355, 371,
  387, 423, 423, 423, 415, 339, 331, 339, 331, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
  339, 339, 440, 440, 440, 440, 440, 440, 440, 324, 339, 339, 339, 339, 339, 339, 339, 339, 401, 423, 423, 424, 422,
  423, 423, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 423, 423, 423,
  423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423,
  423, 423, 423, 423, 423, 423, 338, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
  339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 423, 67, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,
  0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
  17, 17, 17, 17, 17, 17, 17, 17, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 26, 30, 30, 30, 30, 30, 31, 32,
  33, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 37, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
  30, 30, 30, 30, 30, 30, 30, 34, 30, 30, 30, 35, 30, 30, 36, 37, 38, 37, 30, 37, 39, 40, 41, 42, 43, 44, 45, 46, 47,
  30, 30, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 37, 37, 37, 37, 37, 37, 37, 37, 37,
  37, 37, 37, 30, 30, 37, 37, 37, 37, 37, 37, 37, 66, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37,
  66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66
);

(:~
 : The codepoint to charclass mapping for codepoints above the surrogate block.
 :)
declare variable $p:MAP2 as xs:integer+ :=
(
  57344, 63744, 64976, 65008, 65536, 983040, 63743, 64975, 65007, 65533, 983039, 1114111, 37, 30, 37, 30, 30, 37
);

(:~
 : The token-set-id to DFA-initial-state mapping.
 :)
declare variable $p:INITIAL as xs:integer+ :=
(
  1, 8194, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
  2074, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
  60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
  89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114,
  115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137,
  138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160,
  161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183,
  184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206,
  207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226
);

(:~
 : The DFA transition table.
 :)
declare variable $p:TRANSITION as xs:integer+ :=
(
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 8791, 12541, 8704, 8709, 8730, 8727, 8709, 8709, 8709,
  8746, 8773, 8711, 8755, 8771, 8789, 8807, 8841, 14763, 17666, 17667, 17667, 17667, 17667, 17667, 19222, 17667, 17667,
  23549, 15534, 8860, 17667, 17667, 15530, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 8791,
  17667, 17667, 17667, 8899, 17667, 17667, 17667, 17667, 8881, 18074, 8915, 8930, 10888, 18088, 22949, 8841, 14763,
  17666, 17667, 11832, 17667, 17667, 17667, 19222, 17667, 17667, 23549, 9007, 8982, 17667, 17667, 15530, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 8791, 18785, 9003, 17667, 10689, 9023, 17667, 10042, 22503,
  9041, 22501, 15930, 21890, 9066, 9081, 8987, 9103, 14763, 17666, 9087, 17667, 17667, 17667, 17667, 26991, 17667,
  17667, 21859, 9126, 9121, 17891, 17667, 15530, 17667, 17667, 17667, 17667, 10546, 17667, 17667, 17667, 23430, 17667,
  17667, 18768, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  9142, 22530, 9208, 17667, 8899, 9177, 17667, 9214, 17667, 8881, 14937, 9165, 9198, 20187, 14951, 22949, 8841, 14763,
  9230, 11750, 17667, 17667, 17667, 17667, 19222, 17667, 17667, 23549, 15534, 8860, 18445, 17667, 15530, 17667, 17667,
  17667, 17667, 11951, 17667, 17667, 17667, 26850, 17667, 17667, 16908, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 9251, 17667, 15957, 17667, 8899, 9996, 17667, 9235, 10780,
  9275, 17667, 17667, 9300, 9324, 9373, 22949, 8841, 14763, 17666, 17667, 17667, 17667, 17667, 17667, 19222, 17667,
  17667, 23549, 15534, 8860, 17667, 17667, 15530, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  8791, 17667, 17667, 17667, 8899, 14242, 17667, 21714, 14240, 9395, 21715, 9431, 17667, 9420, 9450, 22949, 8841, 14763,
  17666, 17667, 17667, 17667, 17667, 17667, 19222, 17667, 17667, 23549, 15534, 8860, 17667, 17667, 15530, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 8791, 17667, 17667, 17667, 8899, 17667, 17667, 17667, 17667,
  9472, 17667, 17667, 17667, 17667, 9450, 9814, 9497, 14763, 17666, 17667, 17667, 17667, 17667, 17667, 27341, 17667,
  17667, 21968, 26394, 9516, 17667, 17667, 15530, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  8791, 9653, 8821, 17667, 11470, 9537, 17667, 10078, 22418, 9555, 22416, 21128, 22174, 26236, 26251, 26452, 9580,
  14763, 17666, 17667, 9598, 17667, 17667, 17667, 19661, 17667, 17667, 13375, 8825, 9615, 9481, 17667, 15530, 17667,
  17667, 17667, 17667, 21128, 17667, 17667, 17667, 19791, 17667, 17667, 11547, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 9636, 20210, 9767, 9706, 9708, 9669, 9706, 9679, 9681,
  9697, 9724, 9772, 9754, 9738, 9788, 22949, 8841, 21833, 17666, 17667, 17667, 17667, 17667, 17667, 19222, 17667, 17667,
  23549, 15534, 8860, 17667, 17667, 9810, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 8791,
  17667, 9912, 17667, 8899, 12390, 17667, 17667, 9906, 8881, 9845, 9830, 9899, 9859, 9873, 22949, 8841, 14763, 9928,
  17667, 17667, 17667, 17667, 17667, 19222, 17667, 17667, 23549, 15534, 8860, 17667, 17667, 17664, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 8791, 17667, 10804, 17667, 8899, 17667, 17667, 17667, 17667, 8881,
  15056, 9945, 9982, 15069, 9960, 22949, 8841, 14763, 17666, 17667, 17667, 17667, 17667, 17667, 19222, 17667, 17667,
  23549, 15534, 8860, 17667, 17667, 15530, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 26795, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 8791,
  17667, 17667, 17667, 8899, 17667, 17667, 17667, 17667, 8881, 15260, 10020, 17136, 17129, 15274, 22949, 8841, 14763,
  17666, 17667, 17667, 17667, 17667, 17667, 19222, 17667, 17667, 23549, 15534, 8860, 17667, 17667, 10036, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 8791, 17667, 10133, 17667, 8899, 20682, 17667, 17667, 10129,
  10058, 10105, 10094, 10121, 22651, 10072, 22949, 8841, 14763, 17666, 17667, 17667, 17667, 17667, 17667, 19222, 17667,
  17667, 23549, 15534, 8860, 17667, 17667, 15530, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  10149, 17667, 17667, 17667, 8899, 17667, 17667, 17667, 17667, 8881, 15462, 10176, 17412, 17405, 15476, 22949, 8841,
  14763, 17666, 17667, 17667, 23914, 26046, 17667, 19222, 21732, 22724, 13236, 20279, 10192, 10214, 17667, 10036, 17667,
  14852, 23918, 26043, 17667, 21732, 21732, 19505, 16135, 13787, 13787, 21576, 17667, 17667, 17667, 17667, 23209, 10234,
  26045, 20030, 21732, 21732, 21732, 24804, 13787, 13787, 21498, 17667, 17667, 12104, 17667, 17667, 12450, 26972, 17451,
  12163, 21732, 21733, 12837, 13787, 13787, 18546, 17667, 17667, 17667, 19546, 24544, 12160, 21732, 10254, 13177, 21538,
  17667, 17667, 10283, 25044, 21732, 10300, 17161, 16874, 13717, 25046, 12167, 13787, 13296, 20393, 22697, 25306, 9182,
  10320, 10336, 10361, 10396, 10424, 12160, 21499, 25724, 16807, 18201, 18348, 20509, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 8791, 17667, 17667, 17667, 8899, 20878, 17667, 17667,
  20871, 8881, 17667, 17667, 17667, 12601, 10449, 22949, 8841, 14763, 10474, 17667, 17667, 23914, 26046, 17667, 19222,
  21732, 22724, 13236, 20279, 10493, 17667, 17667, 15530, 17667, 17667, 23918, 26043, 17667, 21732, 21732, 19505, 16135,
  13787, 13787, 24062, 17667, 17667, 17667, 17667, 17667, 23917, 26045, 20030, 21732, 21732, 21732, 24804, 13787, 13787,
  21498, 17667, 17667, 17667, 17667, 17667, 13685, 26972, 17451, 12163, 21732, 21733, 12837, 13787, 13787, 18546, 17667,
  17667, 17667, 17667, 24544, 12160, 21732, 14808, 13787, 21538, 17667, 17667, 13685, 25044, 21732, 18610, 21539, 17667,
  10284, 25046, 12167, 13787, 18549, 20543, 12166, 13787, 9182, 10826, 14360, 10827, 12155, 13537, 12160, 21499, 14175,
  16807, 18201, 18348, 20509, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 8791, 15280, 17715, 17667, 8899, 17717, 17667, 17667, 17667, 8881, 15634, 15646, 10515, 17803, 10540, 22949,
  8841, 14763, 17666, 17667, 18714, 17667, 26856, 17667, 19222, 17667, 17667, 23549, 15534, 8860, 17667, 17667, 15530,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 8791, 17667, 10562, 17667, 8899, 8897, 17667,
  17667, 8890, 8881, 17667, 17667, 17667, 20239, 10580, 25215, 8841, 14763, 10605, 17667, 17667, 23914, 26046, 17667,
  19222, 21732, 22724, 13236, 20279, 10624, 17667, 17667, 10646, 11771, 17667, 23918, 26043, 17667, 21732, 21732, 19505,
  16135, 13787, 13787, 24062, 23774, 10668, 23303, 17667, 10687, 23917, 26045, 26298, 21732, 21732, 21732, 17600, 13787,
  13787, 23748, 10705, 10729, 13311, 17667, 12945, 13685, 26972, 21007, 12163, 21732, 21398, 10745, 13787, 13787, 18433,
  10772, 10796, 17667, 17667, 24544, 10820, 21732, 25420, 13787, 24916, 10843, 17667, 13685, 25044, 21732, 18610, 21539,
  17667, 10284, 25046, 12167, 13787, 18549, 20543, 12166, 13787, 9182, 10826, 14360, 10827, 12155, 13537, 12160, 21499,
  14175, 16807, 18201, 18348, 20509, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 10864, 17667, 10198, 17667, 17821, 10564, 10887, 17667, 10885, 8881, 17667, 26747, 10904, 17667, 10926,
  11361, 10951, 21995, 10970, 17667, 17667, 17667, 17667, 17667, 19222, 11198, 10991, 11023, 11257, 10192, 17667, 17667,
  11049, 17667, 17667, 17667, 17667, 11431, 11198, 11198, 11069, 11091, 11100, 11100, 11119, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 12687, 11198, 11198, 11198, 11287, 11100, 11100, 11032, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 11195, 11198, 11199, 16107, 11100, 11100, 11154, 17667, 17667, 17667, 17667, 17667, 11640, 11198, 11174,
  11100, 11102, 17667, 17667, 17667, 11637, 11198, 11253, 11103, 17667, 17667, 11639, 11075, 11100, 11157, 11635, 11074,
  11100, 12688, 11215, 11298, 11216, 11187, 11007, 11640, 11033, 11002, 11232, 11245, 11273, 11314, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 8791, 17667, 9521, 17667, 8899, 9379,
  11391, 17667, 17667, 11347, 11377, 11410, 11447, 24683, 11425, 22949, 8841, 14763, 17666, 17667, 17667, 17667, 17667,
  17667, 19222, 17667, 17667, 23549, 15534, 8860, 17667, 17667, 15530, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 11486, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 11507, 11538, 17667, 22536, 17667, 17667, 11456, 11468, 17667, 11158, 23539, 17667, 17667,
  18971, 11563, 11590, 17667, 17667, 17667, 11465, 17667, 25514, 17667, 22580, 18985, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 8791, 17667, 17667, 17667, 8899, 17667, 17667, 17667, 17667, 8939, 15696, 11614, 15710, 23100,
  11629, 22949, 8841, 14763, 17666, 17667, 17667, 17667, 9620, 17667, 19222, 17667, 17667, 23549, 15534, 11656, 17667,
  17667, 15530, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 11677, 11682, 8844, 17667, 8899,
  17667, 17667, 17667, 17667, 8881, 16087, 11698, 11713, 8843, 16101, 22949, 11746, 14763, 17666, 17667, 17667, 17667,
  22455, 17667, 19222, 17667, 17667, 23549, 15534, 11766, 17667, 17667, 15530, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 11787, 11792, 16420, 17667, 8899, 16422, 17667, 17667, 17667, 8881, 16847, 11808, 11823,
  9025, 16861, 12252, 8841, 14763, 17666, 17667, 17667, 17667, 15665, 17667, 19222, 17667, 17667, 23549, 15534, 11856,
  17667, 17667, 15530, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 11881, 11886, 17667, 17667,
  8899, 24279, 17667, 17667, 17667, 8881, 17667, 24283, 11902, 27185, 11924, 22949, 8841, 14763, 17666, 17667, 19388,
  17667, 17667, 17667, 19222, 17667, 17667, 23549, 23434, 11946, 17667, 17667, 15530, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 8791, 17667, 17667, 17667, 8899, 17667, 17667, 17667, 17667, 8881, 17667, 17667,
  17667, 25953, 11967, 22949, 8841, 14763, 17666, 17667, 17667, 17667, 17667, 17667, 19222, 17667, 17667, 23549, 15534,
  8860, 17667, 17667, 15530, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 11989, 17667, 17667,
  17667, 8899, 12011, 17667, 17667, 17667, 8881, 12030, 12014, 10160, 14179, 12064, 22949, 8841, 14763, 17666, 17667,
  17667, 23914, 26046, 17667, 19222, 21732, 22724, 13236, 20279, 12097, 17667, 17667, 15530, 17667, 17667, 23918, 26043,
  20029, 21732, 21732, 19505, 14062, 13787, 13787, 24062, 17667, 17667, 17667, 17667, 14761, 23917, 26045, 20030, 21732,
  21732, 21732, 24804, 13787, 13787, 21498, 17667, 12120, 23036, 17667, 12945, 13685, 26972, 15346, 12163, 21732, 21733,
  12136, 13787, 13787, 13003, 12183, 10796, 17667, 20981, 24544, 10820, 21732, 25420, 13787, 24916, 10843, 17667, 13685,
  25044, 21732, 18610, 21539, 17667, 12207, 25046, 12167, 13787, 18549, 20543, 12166, 13787, 9182, 10826, 14360, 10827,
  12155, 13537, 12160, 21499, 14175, 16807, 18201, 18348, 20509, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 11989, 17667, 17667, 17667, 8899, 12011, 17667, 17667, 17667, 8881, 12030,
  12014, 10160, 14179, 12064, 22949, 8841, 14763, 17666, 17667, 17667, 23914, 26046, 17667, 19222, 21732, 22724, 13236,
  20279, 12097, 17667, 17667, 15530, 17667, 17667, 23918, 26043, 20029, 21732, 21732, 19505, 14062, 13787, 13787, 24062,
  17667, 17667, 17667, 17667, 14761, 23917, 26045, 20030, 21732, 21732, 21732, 24804, 13787, 13787, 21498, 17667, 12120,
  23036, 17667, 12945, 13685, 26972, 15346, 12163, 21732, 21733, 12136, 13787, 13787, 13003, 12183, 10796, 17667, 17667,
  24544, 10820, 21732, 25420, 13787, 24916, 10843, 17667, 13685, 25044, 21732, 18610, 21539, 17667, 10284, 25046, 12167,
  13787, 18549, 20543, 12166, 13787, 9182, 10826, 14360, 10827, 12155, 13537, 12160, 21499, 14175, 16807, 18201, 18348,
  20509, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 11989, 17667,
  17667, 17667, 8899, 12011, 17667, 17667, 17667, 8881, 12030, 12014, 10160, 14179, 12064, 22949, 8841, 14763, 17666,
  17667, 17667, 23914, 26046, 17667, 19222, 21732, 22724, 13236, 20279, 12097, 17667, 17667, 15530, 17667, 17667, 23918,
  26043, 20029, 21732, 21732, 19505, 14062, 13787, 13787, 24062, 17667, 17667, 17667, 17667, 12229, 23917, 26045, 20030,
  21732, 21732, 21732, 24804, 13787, 13787, 21498, 17667, 12120, 23036, 17667, 12945, 13685, 26972, 15346, 12163, 21732,
  21733, 12136, 13787, 13787, 13003, 12183, 10796, 17667, 17667, 24544, 10820, 21732, 25420, 13787, 24916, 10843, 17667,
  13685, 25044, 21732, 18610, 21539, 17667, 10284, 25046, 12167, 13787, 18549, 20543, 12166, 13787, 9182, 10826, 14360,
  10827, 12155, 13537, 12160, 21499, 14175, 16807, 18201, 18348, 20509, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 11989, 17667, 17667, 17667, 8899, 12011, 17667, 17667, 17667, 8881,
  12030, 12014, 10160, 14179, 12064, 22949, 8841, 14763, 17666, 17667, 17667, 23914, 26046, 17667, 19222, 21732, 22724,
  13236, 20279, 12097, 17667, 17667, 15530, 17667, 17667, 23918, 26043, 20029, 21732, 21732, 19505, 14062, 13787, 13787,
  24062, 17667, 17667, 17667, 17667, 14761, 23917, 26045, 20030, 21732, 21732, 21732, 24804, 13787, 13787, 21498, 17667,
  12120, 23036, 17667, 12945, 12268, 26972, 15346, 12163, 21732, 21733, 12136, 13787, 13787, 13003, 12183, 10796, 17667,
  17667, 24544, 10820, 21732, 25420, 13787, 24916, 10843, 17667, 13685, 25044, 21732, 18610, 21539, 17667, 10284, 25046,
  12167, 13787, 18549, 20543, 12166, 13787, 9182, 10826, 14360, 10827, 12155, 13537, 12160, 21499, 14175, 16807, 18201,
  18348, 20509, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 11989,
  17667, 17667, 17667, 8899, 12011, 17667, 17667, 17667, 8881, 12030, 12014, 10160, 14179, 12064, 22949, 8841, 14763,
  12288, 17667, 17667, 23914, 26046, 17667, 19222, 21732, 22724, 13236, 20279, 12097, 17667, 17667, 12307, 17667, 17667,
  23918, 26043, 20029, 21732, 21732, 19505, 14062, 13787, 13787, 24062, 17667, 17667, 17667, 17667, 14761, 23917, 26045,
  20030, 21732, 21732, 21732, 24804, 13787, 13787, 21498, 17667, 12120, 23036, 17667, 12945, 13685, 26972, 15346, 12163,
  21732, 21733, 12136, 13787, 13787, 13003, 12183, 10796, 17667, 17667, 24544, 10820, 21732, 25420, 13787, 24916, 10843,
  17667, 13685, 25044, 21732, 18610, 21539, 17667, 10284, 25046, 12167, 13787, 18549, 20543, 12166, 13787, 9182, 10826,
  14360, 10827, 12155, 13537, 12160, 21499, 14175, 16807, 18201, 18348, 20509, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 11989, 17667, 17667, 17667, 8899, 12011, 17667, 17667, 17667,
  8881, 12030, 12014, 10160, 14179, 12064, 22949, 8841, 14763, 17666, 17667, 17667, 23914, 26046, 17667, 19222, 21732,
  22724, 13236, 20279, 12097, 17667, 17667, 15530, 17667, 17667, 23918, 26043, 20029, 21732, 21732, 19505, 14062, 13787,
  13787, 24062, 17667, 17667, 17667, 17667, 17667, 23917, 26045, 20030, 21732, 21732, 21732, 24804, 13787, 13787, 21498,
  17667, 17667, 17667, 17667, 17667, 13685, 26972, 17451, 12163, 21732, 21733, 12837, 13787, 13787, 18546, 17667, 17667,
  17667, 17667, 24544, 12160, 21732, 14808, 13787, 21538, 17667, 17667, 13685, 25044, 21732, 18610, 21539, 17667, 10284,
  25046, 12167, 13787, 18549, 20543, 12166, 13787, 9182, 10826, 14360, 10827, 12155, 13537, 12160, 21499, 14175, 16807,
  18201, 18348, 20509, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  11989, 17667, 17667, 17667, 8899, 12011, 17667, 17667, 17667, 8881, 12030, 12014, 10160, 14179, 12064, 22949, 8841,
  14763, 17666, 17667, 17667, 23914, 26046, 17667, 19222, 21732, 22724, 13236, 20279, 12328, 17667, 17667, 15530, 17667,
  17667, 23918, 26043, 20029, 21732, 21732, 19505, 14062, 13787, 13787, 24062, 17667, 17667, 17667, 17667, 17667, 23917,
  26045, 20030, 21732, 21732, 21732, 24804, 13787, 13787, 21498, 17667, 17667, 17667, 17667, 17667, 13685, 26972, 17451,
  12163, 21732, 21733, 12837, 13787, 13787, 18546, 17667, 17667, 17667, 17667, 24544, 12160, 21732, 14808, 13787, 21538,
  17667, 17667, 13685, 25044, 21732, 18610, 21539, 17667, 10284, 25046, 12167, 13787, 18549, 20543, 12166, 13787, 9182,
  10826, 14360, 10827, 12155, 13537, 12160, 21499, 14175, 16807, 18201, 18348, 20509, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 11989, 17667, 17667, 17667, 8899, 12011, 17667, 17667,
  17667, 8881, 12030, 12014, 10160, 14179, 12351, 22949, 8841, 14763, 17666, 17667, 17667, 23914, 26046, 17667, 19222,
  21732, 22724, 13236, 20279, 12097, 17667, 17667, 15530, 17667, 17667, 23918, 26043, 20029, 21732, 21732, 19505, 14062,
  13787, 13787, 24062, 17667, 17667, 17667, 17667, 17667, 23917, 26045, 20030, 21732, 21732, 21732, 24804, 13787, 13787,
  21498, 17667, 17667, 17667, 17667, 17667, 13685, 26972, 17451, 12163, 21732, 21733, 12837, 13787, 13787, 18546, 17667,
  17667, 17667, 17667, 24544, 12160, 21732, 14808, 13787, 21538, 17667, 17667, 13685, 25044, 21732, 18610, 21539, 17667,
  10284, 25046, 12167, 13787, 18549, 20543, 12166, 13787, 9182, 10826, 14360, 10827, 12155, 13537, 12160, 21499, 14175,
  16807, 18201, 18348, 20509, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 11989, 17667, 17667, 17667, 8899, 12011, 17667, 17667, 17667, 12376, 12030, 12014, 10160, 14179, 12064, 22949,
  8841, 14763, 17666, 17667, 17667, 23914, 26046, 17667, 19222, 21732, 22724, 13236, 20279, 12097, 17667, 17667, 15530,
  17667, 19757, 23918, 26043, 20029, 21732, 21732, 19505, 14062, 13787, 13787, 24062, 17667, 17667, 17667, 17667, 17667,
  23917, 26045, 20030, 21732, 21732, 21732, 24804, 13787, 13787, 21498, 17667, 17667, 17667, 17667, 17667, 13685, 26972,
  17451, 12163, 21732, 21733, 12837, 13787, 13787, 18546, 17667, 17667, 17667, 17667, 24544, 12160, 21732, 14808, 13787,
  21538, 17667, 17667, 13685, 25044, 21732, 18610, 21539, 17667, 10284, 25046, 12167, 13787, 18549, 20543, 12166, 13787,
  9182, 10826, 14360, 10827, 12155, 13537, 12160, 21499, 14175, 16807, 18201, 18348, 20509, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 11989, 17667, 17667, 17667, 8899, 12011, 17667,
  17667, 17667, 8881, 12030, 12014, 10160, 14179, 12064, 22949, 8841, 14763, 17666, 17667, 17667, 23914, 26046, 17667,
  19222, 21732, 22724, 13236, 20279, 12097, 17667, 17667, 15530, 17667, 17667, 23918, 26043, 20029, 21732, 21732, 19505,
  14062, 13787, 13787, 24062, 17667, 17667, 17667, 17667, 17667, 23917, 26045, 20030, 21732, 21732, 21732, 24804, 13787,
  13787, 21498, 17667, 17667, 17667, 17667, 17667, 13685, 26972, 17451, 12163, 21732, 21733, 12837, 13787, 13787, 18546,
  17667, 17667, 17667, 17667, 24544, 12160, 21732, 14808, 13787, 21538, 17667, 17667, 12424, 25044, 21732, 18610, 21539,
  17667, 10284, 25046, 12167, 13787, 18549, 20543, 12166, 13787, 9182, 10826, 14360, 10827, 12155, 13537, 12160, 21499,
  14175, 16807, 18201, 18348, 20509, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 12444, 17667, 17667, 17667, 8899, 12011, 17667, 17667, 17667, 8881, 12030, 12014, 10160, 14179, 12064,
  22949, 8841, 14763, 17666, 17667, 17667, 23914, 26046, 17667, 19222, 21732, 22724, 13236, 20279, 12097, 17667, 17667,
  15530, 17667, 17667, 23918, 26043, 20029, 21732, 21732, 19505, 14062, 13787, 13787, 24062, 17667, 17667, 17667, 17667,
  17667, 23917, 26045, 20030, 21732, 21732, 21732, 24804, 13787, 13787, 21498, 17667, 17667, 17667, 17667, 17667, 13685,
  26972, 17451, 12163, 21732, 21733, 12837, 13787, 13787, 18546, 17667, 17667, 17667, 17667, 24544, 12160, 21732, 14808,
  13787, 21538, 17667, 17667, 13685, 25044, 21732, 18610, 21539, 17667, 10284, 25046, 12167, 13787, 18549, 20543, 12166,
  13787, 9182, 10826, 14360, 10827, 12155, 13537, 12160, 21499, 14175, 16807, 18201, 18348, 20509, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 8791, 17667, 17667, 17667, 8899, 17667,
  17667, 17667, 17667, 8881, 17192, 17204, 12466, 9105, 12491, 22949, 8841, 14763, 17666, 17667, 17667, 17667, 17667,
  17667, 19222, 17667, 17667, 23549, 15534, 8860, 17667, 17667, 15530, 17667, 16196, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 9456, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 8791, 17667, 17667, 17667, 8899, 17667, 17667, 17667, 17667, 8881, 17667, 17667, 17667, 17667,
  9450, 22949, 8841, 14763, 17666, 17667, 17667, 17667, 17667, 17667, 19222, 17667, 17667, 23549, 15534, 8860, 17667,
  17667, 15530, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 12513, 17667, 9499, 17667, 8899,
  17667, 17667, 17667, 9500, 8881, 12557, 12572, 12617, 9499, 12587, 22949, 8841, 14763, 17666, 17667, 17667, 17667,
  17667, 17667, 19222, 17667, 17667, 23549, 15534, 12650, 17667, 17667, 15530, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 11989, 17667, 17667, 12686, 8899, 12671, 12718, 17667, 12704, 12740, 12755, 12770, 12785,
  12799, 12815, 22949, 12831, 12894, 12853, 23086, 12875, 25545, 17441, 12891, 26221, 12910, 12961, 12991, 13042, 13085,
  13015, 17667, 20012, 17667, 13114, 25833, 25914, 12312, 21732, 16507, 22925, 24015, 13787, 23399, 20745, 17667, 18044,
  17667, 13134, 14761, 12213, 14134, 13153, 25413, 17570, 21732, 24804, 16970, 13787, 20603, 17667, 12120, 21459, 17667,
  14487, 13974, 13202, 24714, 13226, 13261, 21733, 13281, 13333, 13787, 13003, 12183, 13349, 9350, 13365, 24544, 10820,
  22016, 25246, 13787, 18499, 13399, 13415, 13685, 25044, 13439, 13460, 24891, 17667, 10284, 15320, 25780, 13480, 18549,
  20543, 12166, 13787, 9182, 10826, 14360, 10827, 25165, 13537, 13510, 14217, 13532, 23844, 18201, 18348, 20509, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 11989, 17667, 17667, 13553,
  8899, 12011, 18778, 17667, 17667, 13573, 12030, 13598, 10160, 14179, 12064, 22949, 8841, 14763, 17666, 17667, 17667,
  23914, 26046, 17667, 19222, 21732, 22724, 13236, 20279, 12097, 17667, 17667, 15530, 17667, 17667, 23918, 26043, 20029,
  21732, 21732, 19505, 14062, 13787, 13787, 24062, 17667, 17667, 17667, 11840, 13634, 26183, 23258, 20030, 21732, 17841,
  21732, 24804, 13787, 13787, 13659, 17667, 12120, 23036, 17667, 12945, 13685, 26972, 15346, 12163, 21732, 21733, 12136,
  13787, 13787, 13003, 12183, 10796, 17667, 13682, 13702, 13753, 21381, 14698, 13786, 24916, 10843, 17667, 13685, 25044,
  21732, 18610, 21539, 17667, 10284, 25046, 12167, 13787, 18549, 20543, 12166, 13787, 9182, 10826, 14360, 10827, 12155,
  13537, 19087, 26101, 14175, 16807, 18201, 18348, 20509, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 13804, 13828, 17667, 15749, 8899, 12011, 13812, 17667, 22628, 13845, 13861, 13876,
  13891, 13905, 13921, 22949, 8841, 27237, 17666, 16920, 17667, 23914, 26046, 17667, 19222, 21732, 22724, 13946, 19585,
  12097, 17667, 13971, 13990, 17667, 12081, 14017, 26043, 14033, 14049, 21732, 15565, 19136, 14087, 13787, 13666, 17667,
  17667, 24974, 17667, 14761, 14110, 26045, 20030, 19029, 13770, 18463, 24804, 17987, 16144, 21498, 17667, 12120, 23036,
  17667, 23042, 13685, 26972, 15346, 12163, 21732, 19510, 12136, 13787, 19170, 13003, 12183, 10796, 17667, 17667, 24544,
  10820, 21732, 25420, 13787, 24916, 10843, 17667, 13685, 14167, 14195, 18610, 14214, 14233, 10284, 14258, 14274, 26575,
  18549, 20543, 22930, 14734, 9182, 10826, 14360, 10827, 12155, 18208, 14316, 14356, 14175, 16807, 18201, 13494, 14376,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 11989, 17667, 17667,
  25659, 8899, 12011, 9564, 14858, 23297, 14401, 14417, 14433, 14448, 14462, 14478, 22949, 8841, 14763, 17666, 17667,
  17667, 23914, 14503, 21211, 23985, 13762, 18874, 14529, 14554, 14585, 17667, 19899, 15530, 14631, 17667, 15229, 25036,
  14648, 14664, 14691, 16598, 19575, 14714, 14730, 24062, 17667, 17667, 19798, 11730, 14761, 23917, 26045, 20030, 21732,
  21732, 21732, 24804, 13787, 13787, 21498, 17667, 12120, 22483, 10671, 14750, 13685, 26972, 15346, 14779, 21732, 14802,
  14824, 13787, 13787, 14840, 12183, 10796, 17667, 17667, 14874, 14898, 25071, 14786, 13787, 14922, 10843, 26908, 8865,
  14978, 14994, 25481, 21567, 17667, 10284, 25046, 12167, 13787, 14385, 20543, 15016, 10304, 9182, 10826, 14360, 10827,
  10267, 15025, 22855, 18540, 14175, 16807, 18201, 18348, 20509, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 11989, 17667, 17667, 16880, 8899, 12011, 15041, 17667, 15085, 15106, 15122,
  15137, 15152, 15166, 15182, 16446, 15215, 11331, 15245, 17667, 13317, 15296, 15336, 15362, 15378, 15394, 14340, 15431,
  15447, 12097, 26390, 22979, 15504, 25358, 24969, 23918, 26190, 25869, 20139, 15573, 15550, 14062, 15589, 20635, 15619,
  15662, 24179, 15681, 23508, 14761, 11522, 15735, 15774, 15790, 15819, 15848, 15879, 26728, 15913, 15946, 17667, 15980,
  20948, 15996, 12945, 16015, 16052, 16072, 16330, 25136, 16123, 12136, 16160, 21935, 16184, 16218, 10796, 25679, 20863,
  10238, 16234, 16309, 16346, 19612, 16405, 16438, 17667, 13685, 16462, 16503, 16816, 16523, 18722, 16539, 16570, 16614,
  16651, 16667, 16700, 16736, 16769, 27289, 24578, 25710, 16794, 16627, 16832, 17551, 16896, 16942, 16807, 22045, 16991,
  20509, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 11989, 10975,
  17667, 17667, 8899, 17020, 14151, 9599, 14151, 17045, 17089, 17104, 17059, 17073, 17120, 22949, 8841, 15518, 17666,
  17667, 17667, 23914, 26046, 17667, 19222, 21732, 22724, 17152, 17177, 12097, 17667, 17227, 17220, 17667, 11930, 17247,
  26043, 20029, 17274, 21732, 19505, 14300, 13787, 13787, 24062, 17667, 17667, 17667, 17667, 14761, 23917, 26045, 20030,
  21732, 26319, 21732, 24804, 13787, 26359, 21498, 17667, 12120, 23036, 17667, 12945, 13685, 26972, 15346, 12163, 21732,
  21733, 12136, 13787, 13787, 13003, 12183, 10796, 21976, 17667, 21258, 10820, 21296, 25420, 13787, 16487, 10843, 17667,
  13685, 25044, 21732, 18610, 21539, 17667, 10284, 25046, 12167, 13787, 25350, 20543, 12166, 13787, 9182, 10826, 14360,
  10827, 12155, 13537, 12160, 21499, 14175, 16807, 23659, 15603, 17296, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 11989, 17667, 17667, 17667, 8899, 12011, 9929, 17667, 9646, 17321,
  17335, 17351, 17366, 17380, 17396, 22949, 8841, 14763, 17666, 13118, 17667, 23914, 26046, 17667, 19222, 21732, 22724,
  13236, 20279, 12097, 12241, 17667, 15530, 17667, 26646, 23918, 26043, 12655, 21732, 21732, 19505, 26424, 13787, 13787,
  21603, 17667, 17667, 17667, 17667, 17667, 23917, 26045, 20030, 21732, 21732, 21732, 24804, 13787, 13787, 21498, 17667,
  17667, 17667, 17667, 17667, 13685, 26972, 17451, 12163, 21732, 21733, 12837, 13787, 13787, 18546, 17667, 17667, 17667,
  17667, 24544, 12160, 21732, 14808, 13787, 21538, 17667, 10848, 13685, 25044, 21732, 18610, 21539, 19984, 17428, 25046,
  12167, 13787, 20518, 17468, 17497, 23381, 26257, 17513, 17542, 10827, 12155, 13537, 12160, 21499, 14175, 16807, 18201,
  17962, 20509, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 11989,
  17667, 17667, 17667, 8899, 12011, 17667, 17667, 17667, 8881, 12030, 12014, 10160, 14179, 12064, 22949, 8841, 10630,
  17666, 17667, 20675, 23914, 23467, 17667, 19222, 17567, 17586, 24425, 16168, 12097, 17635, 9434, 15530, 23202, 17667,
  23918, 26043, 20029, 21732, 21732, 20434, 14062, 13787, 18312, 24062, 17667, 17667, 17667, 17667, 17667, 23917, 26045,
  20030, 21732, 21732, 21732, 24804, 13787, 13787, 21498, 21238, 17667, 17667, 17667, 17667, 13685, 26972, 17451, 12163,
  21732, 21733, 12837, 13787, 13787, 18546, 10954, 17667, 17667, 17667, 24544, 12160, 21732, 24842, 13787, 26433, 17667,
  17667, 13685, 25044, 21732, 18610, 21539, 17667, 10284, 25046, 12167, 13787, 18549, 20543, 12166, 13787, 9182, 26931,
  19078, 10827, 12155, 13537, 12160, 21499, 14175, 16807, 18201, 18348, 20509, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 11989, 22670, 17667, 17668, 17652, 12011, 22449, 17684, 22398,
  17701, 17733, 17749, 17764, 17778, 17794, 22949, 8841, 11053, 17666, 17667, 10910, 19107, 26046, 17819, 15488, 17837,
  10408, 19688, 20279, 12097, 17667, 17667, 15530, 17857, 17667, 23918, 17877, 17916, 17932, 18112, 19505, 17948, 10380,
  21942, 18003, 18040, 15090, 18060, 13582, 12048, 23917, 23496, 20030, 21732, 13516, 18110, 24804, 13787, 18254, 21758,
  17667, 17667, 17667, 18365, 25942, 13685, 26972, 17451, 12163, 21732, 18128, 12859, 13787, 13787, 18546, 23692, 17667,
  13057, 18150, 24544, 12160, 21732, 18188, 19712, 21538, 27052, 27178, 16202, 18224, 18270, 18294, 18337, 18364, 17029,
  18381, 23796, 18421, 15928, 18479, 12166, 13787, 18515, 10826, 14360, 10827, 25259, 18566, 12160, 21499, 14175, 23672,
  18602, 18348, 25341, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  11989, 11491, 17667, 17667, 8899, 12011, 17452, 17667, 9883, 18630, 18644, 18660, 18675, 18689, 18705, 22949, 18738,
  14763, 17666, 18754, 17667, 24310, 26046, 26024, 25891, 18801, 15863, 18846, 20279, 12328, 23270, 17667, 24222, 12073,
  22272, 16684, 15310, 12655, 18822, 18862, 18899, 12925, 23391, 18922, 18957, 17667, 22318, 17667, 17667, 17667, 18172,
  26045, 20030, 19006, 21732, 21732, 12975, 19053, 13787, 21498, 23230, 17667, 17667, 17667, 26616, 19103, 25839, 17451,
  12163, 19123, 21733, 12837, 13787, 19152, 18546, 17667, 17667, 19186, 17667, 13727, 22730, 21732, 14808, 23743, 21538,
  17667, 19204, 24744, 17258, 21732, 26135, 21539, 26623, 10713, 25046, 12167, 13787, 26110, 20543, 22135, 20718, 9182,
  10826, 14360, 10827, 12155, 13537, 12160, 21499, 17004, 17526, 18201, 19478, 20509, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 11989, 19220, 17667, 17667, 19238, 12011, 17667, 19220,
  17667, 19268, 19298, 19334, 19349, 19363, 19379, 22949, 8841, 19412, 17666, 17667, 17667, 24666, 26046, 26874, 27089,
  19440, 20074, 19464, 19526, 12097, 17667, 24525, 15530, 23072, 17667, 23918, 26043, 20029, 21732, 19562, 19492, 15803,
  13787, 19601, 24062, 12475, 19628, 19659, 17667, 17667, 23917, 26045, 15758, 21732, 21732, 19677, 16476, 19704, 19728,
  25311, 19748, 17667, 17667, 19781, 24246, 19814, 26972, 17451, 18883, 21732, 24791, 12837, 19163, 16778, 18546, 17667,
  17667, 17667, 17667, 24544, 12160, 21732, 14808, 13787, 21538, 17667, 17667, 13685, 25044, 21732, 18610, 21539, 13613,
  10284, 25046, 12167, 13787, 18549, 20543, 12166, 13787, 9182, 10826, 20608, 22879, 19841, 13537, 12160, 21499, 14175,
  16807, 18201, 18348, 20509, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 11989, 15897, 17667, 17667, 19874, 12011, 17667, 19865, 10589, 19890, 19915, 19929, 19945, 19959, 19975, 14615,
  8841, 20000, 23024, 20028, 25759, 26006, 20046, 21633, 27126, 20062, 20090, 20106, 20155, 12097, 13829, 20186, 20203,
  17667, 20226, 23918, 26043, 12360, 21732, 21732, 24414, 14062, 18303, 13787, 24062, 17667, 12626, 17900, 17667, 25652,
  26681, 26045, 20030, 20255, 21732, 21732, 24804, 20276, 13787, 21498, 17685, 17667, 17667, 17667, 17667, 27152, 26973,
  22344, 20295, 25079, 21733, 22634, 13787, 21070, 18546, 17667, 11394, 20316, 20350, 20366, 20421, 20450, 20466, 20495,
  21786, 17667, 24729, 20534, 25044, 20559, 25457, 21539, 8957, 12724, 22562, 20588, 23370, 12940, 14569, 15415, 20624,
  19396, 20651, 14360, 20698, 25108, 20734, 20761, 16379, 14175, 16807, 20479, 18348, 20665, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 11989, 17667, 17667, 17667, 23010, 12011, 18990,
  18017, 24273, 20777, 20793, 20838, 20808, 20822, 20854, 20896, 20936, 14763, 17666, 17667, 20964, 25005, 20997, 21674,
  21023, 21039, 18405, 21055, 21086, 12097, 17667, 17667, 15530, 21126, 21144, 23918, 21171, 20029, 14198, 21908, 20572,
  14062, 13955, 21425, 21197, 17667, 17667, 17636, 13618, 21232, 21254, 13210, 21274, 21732, 21312, 21732, 24804, 13787,
  21328, 12147, 17667, 13069, 21345, 25570, 17667, 13685, 26972, 14513, 21378, 21397, 21733, 21414, 26143, 13787, 18941,
  21447, 17667, 19318, 26902, 24544, 12160, 21732, 14808, 13787, 21538, 17667, 11132, 13685, 14882, 23630, 21475, 21496,
  21515, 13686, 21181, 12167, 21536, 18549, 20543, 12166, 13787, 13098, 26703, 21794, 21555, 14287, 21592, 12160, 21499,
  14175, 16807, 25449, 20120, 23975, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 11989, 20880, 17667, 17667, 8899, 12011, 17667, 22310, 10935, 21619, 12030, 12291, 14001, 21649, 21664,
  22949, 8841, 16389, 17666, 17667, 17667, 23914, 26046, 17667, 19282, 21732, 22724, 13236, 20279, 12097, 17667, 21690,
  15530, 11908, 21713, 20334, 26043, 11865, 18906, 21731, 18836, 21749, 21774, 13788, 24062, 27021, 21810, 17667, 17667,
  21830, 23917, 26045, 13930, 21732, 21732, 21732, 17976, 13787, 13787, 16975, 21849, 9339, 21883, 17667, 20170, 26674,
  16029, 16554, 16635, 21906, 21733, 21924, 13186, 13787, 24939, 21958, 17667, 21992, 17667, 24544, 12160, 22011, 22032,
  13787, 22061, 17667, 17667, 13685, 25044, 21732, 18610, 21539, 17667, 10284, 25046, 12167, 13787, 18549, 20543, 12166,
  13787, 9182, 10826, 10433, 10827, 16359, 13537, 12160, 21499, 14175, 16807, 18201, 18348, 20509, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 11989, 17667, 17667, 17667, 8899, 12011,
  17667, 17667, 17667, 8881, 12030, 12014, 10160, 14179, 12064, 22949, 8841, 14763, 17666, 13557, 17667, 12428, 26046,
  22080, 22279, 22130, 22151, 14675, 16293, 12097, 14597, 17667, 15530, 17667, 17667, 23918, 26043, 21216, 21732, 21732,
  19505, 13168, 13787, 13787, 25736, 17667, 17667, 17667, 17667, 17667, 23917, 26045, 20030, 21732, 21732, 21732, 24804,
  13787, 13787, 21498, 17667, 17667, 17667, 17667, 17667, 13685, 26972, 17451, 12163, 21732, 21733, 12837, 13787, 13787,
  18546, 17667, 17667, 17667, 17667, 24544, 12160, 21732, 14808, 13787, 21538, 17667, 17667, 13685, 25044, 21732, 18610,
  21539, 17667, 10284, 25046, 12167, 13787, 18549, 20543, 23612, 16287, 9182, 10826, 14360, 10827, 12155, 13537, 12160,
  21499, 14175, 16807, 18201, 18348, 20509, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 11989, 17667, 17667, 17667, 10458, 22167, 12191, 19765, 17667, 22190, 22217, 22201, 22232, 22246,
  22262, 22295, 8841, 15719, 19252, 11722, 20380, 9050, 22334, 8966, 19643, 22814, 18393, 22367, 22383, 22434, 17667,
  17667, 22471, 22519, 10477, 23918, 22552, 20029, 18806, 23604, 20134, 14062, 24631, 18249, 24062, 22578, 17667, 17667,
  25507, 21867, 23460, 25558, 20030, 22601, 23712, 22596, 16248, 13245, 13787, 22617, 10608, 22650, 17667, 25581, 22667,
  13685, 14123, 12043, 12163, 22686, 22713, 12837, 18614, 22746, 22770, 17667, 22790, 17667, 24476, 24544, 10345, 21732,
  14808, 22830, 21538, 12335, 18094, 13685, 25044, 19448, 18610, 24639, 17667, 10284, 24570, 13444, 13787, 15894, 20543,
  12166, 13787, 9182, 10826, 24898, 24621, 22850, 13537, 22871, 22895, 14175, 16807, 19066, 22911, 20509, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 11989, 22946, 17667, 17667, 13423,
  22965, 17667, 22995, 23058, 23116, 23132, 23147, 23162, 23176, 23192, 22949, 23225, 14763, 17666, 8948, 17667, 23246,
  23286, 19313, 23319, 23335, 16585, 23359, 23415, 23450, 11661, 22495, 15530, 17667, 17667, 23483, 23524, 23579, 23595,
  23628, 19020, 17481, 23646, 13787, 24062, 22410, 23557, 17667, 23688, 17667, 23917, 26045, 23563, 21732, 21732, 21732,
  24804, 13787, 13787, 21498, 17667, 17667, 17667, 12528, 10218, 15191, 16036, 17451, 23708, 24373, 15000, 16926, 13787,
  23728, 18546, 17667, 23764, 17667, 17667, 21362, 23790, 23812, 23831, 13464, 24093, 23869, 9357, 16676, 25044, 23815,
  23895, 18932, 17667, 23911, 25046, 12167, 13787, 17305, 23934, 23961, 22754, 24001, 10826, 14360, 24040, 12155, 13537,
  18456, 24056, 16369, 24078, 18201, 18348, 20509, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 11989, 22110, 17667, 17667, 22351, 12011, 17667, 18024, 21697, 8881, 24109, 24153, 24123,
  24137, 24169, 24195, 8841, 24210, 24238, 24262, 12402, 21355, 24299, 24326, 24342, 24358, 24401, 24441, 24457, 24492,
  17667, 15964, 24508, 10217, 17861, 24541, 24560, 24594, 21732, 24610, 15409, 18237, 14094, 17611, 24062, 12634, 24655,
  24682, 19541, 17667, 24699, 24760, 24776, 24831, 24858, 14906, 24876, 14538, 24914, 24932, 24955, 17667, 22774, 11995,
  24990, 18165, 25021, 14145, 25062, 20260, 25803, 12837, 25095, 17619, 18546, 17667, 12497, 17667, 14608, 19825, 14962,
  25129, 18134, 25152, 25192, 21155, 25212, 27263, 25231, 26342, 23853, 16753, 9794, 10284, 13737, 25275, 25291, 18580,
  22803, 25327, 24815, 25374, 23945, 25390, 10827, 12155, 13537, 12160, 25196, 16710, 25436, 25473, 18348, 25497, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 11989, 17667, 17667, 17667,
  8899, 12011, 17667, 11324, 17667, 8881, 25530, 25597, 25612, 25626, 25642, 22949, 8841, 14763, 25675, 24472, 17667,
  23914, 26046, 17667, 19222, 21732, 16321, 25695, 20279, 12097, 17231, 17667, 15530, 14632, 25752, 26070, 26043, 20029,
  25775, 21732, 25796, 15832, 13787, 13787, 25819, 25855, 25885, 24518, 17667, 13643, 25907, 25930, 9259, 19037, 25969,
  21289, 16276, 10756, 16957, 22064, 25995, 17667, 17667, 26022, 17667, 13685, 26040, 17451, 25402, 21732, 21733, 12837,
  20713, 13787, 18546, 17667, 9308, 17667, 17667, 24544, 12160, 21732, 14808, 13787, 21538, 26951, 17667, 26062, 25044,
  17280, 16746, 21539, 17667, 10284, 25046, 12167, 13787, 18549, 20543, 12166, 13787, 9182, 26086, 14360, 10827, 12155,
  13537, 12160, 21499, 18489, 26126, 18201, 16262, 20509, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 11989, 17667, 17667, 17667, 8899, 12011, 10499, 18550, 18586, 26173, 26159, 26206,
  11574, 26273, 26288, 22949, 8841, 14763, 17666, 17667, 17667, 23914, 26046, 17667, 19222, 26314, 20405, 25979, 20279,
  12097, 17667, 17667, 15530, 17667, 17667, 15199, 16056, 20029, 26335, 21732, 19505, 14062, 26358, 13787, 24062, 17667,
  17667, 17667, 21814, 17667, 23917, 26375, 20030, 24860, 21732, 21732, 24804, 21329, 13787, 21498, 17667, 17667, 17667,
  17667, 17667, 13685, 26972, 17451, 12163, 21732, 21733, 12837, 13787, 13787, 18546, 17667, 17667, 17667, 17667, 24544,
  12160, 21732, 14808, 13787, 21538, 13383, 17667, 13685, 25044, 21732, 18610, 21539, 17667, 10284, 25046, 12167, 13787,
  18549, 20543, 12166, 13787, 26410, 10826, 14360, 10827, 12155, 13537, 12160, 21499, 14175, 16807, 18201, 18348, 20509,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 11989, 17667, 17667,
  17667, 12408, 12011, 17667, 26449, 10524, 26468, 26495, 26479, 26510, 26524, 26540, 22949, 8841, 14763, 17666, 17667,
  17667, 23914, 26046, 17667, 19222, 21732, 22724, 26566, 16720, 12097, 17667, 17667, 15530, 17667, 17667, 23918, 26043,
  20029, 21732, 21732, 19505, 14062, 13787, 13787, 24062, 17667, 17667, 17667, 17667, 17667, 23917, 26045, 20030, 21732,
  21732, 21732, 24804, 13787, 13787, 21498, 17667, 17667, 17667, 17667, 10004, 13685, 26972, 17451, 12163, 21732, 21733,
  12837, 13787, 13787, 18546, 17667, 17667, 20973, 17667, 24544, 25113, 21732, 18278, 14071, 24024, 17667, 17667, 13685,
  25044, 21732, 18610, 21539, 17667, 10284, 25046, 12167, 13787, 18549, 20543, 12166, 13787, 9182, 10826, 14360, 10827,
  12155, 13537, 12160, 21499, 14175, 16807, 18201, 18348, 20509, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 12444, 17667, 17667, 17667, 8899, 12011, 17667, 17667, 17667, 8881, 12030,
  13137, 13026, 26591, 26606, 22949, 8841, 14763, 26639, 17667, 17667, 12272, 26046, 26662, 9149, 26697, 24385, 25176,
  20279, 12097, 17667, 17667, 19424, 11598, 17667, 23918, 26043, 20029, 21732, 21732, 19505, 26719, 13787, 22834, 24062,
  23879, 26744, 17667, 17667, 17667, 23917, 26045, 26550, 21732, 21732, 21732, 18529, 13787, 13787, 21480, 26763, 17667,
  17667, 17667, 17667, 13685, 26972, 17451, 12163, 21732, 21733, 12837, 13787, 13787, 18546, 17667, 22114, 17667, 17667,
  24544, 12160, 21732, 14808, 13787, 21538, 17667, 17667, 13685, 25044, 21732, 18610, 21539, 17667, 10284, 25046, 12167,
  13787, 18549, 20543, 12166, 13787, 9182, 10826, 14360, 10827, 12155, 13537, 12160, 21499, 14175, 16807, 18201, 18348,
  20509, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 11989, 17667,
  17667, 17667, 8899, 12011, 17667, 17667, 17667, 8881, 12030, 12014, 10160, 14179, 12064, 22949, 26787, 14763, 17666,
  10652, 17667, 23914, 26046, 17667, 19222, 21732, 14328, 26811, 18321, 26836, 17667, 17667, 15530, 17667, 17667, 23918,
  26043, 20029, 21732, 13265, 19505, 14062, 13787, 19732, 24062, 17667, 11973, 17667, 26872, 17667, 23917, 26890, 20030,
  21732, 26924, 21732, 24804, 13787, 10372, 21498, 17667, 17667, 17667, 26947, 17667, 13685, 26967, 17451, 19849, 21732,
  23343, 12837, 26820, 13787, 18546, 17667, 17667, 17667, 17667, 24544, 12160, 20300, 14808, 13787, 21431, 17667, 17667,
  13685, 25044, 21732, 18610, 21539, 26989, 20327, 25046, 12167, 13787, 18549, 20543, 12166, 13787, 9182, 10826, 14360,
  10827, 12155, 13537, 12160, 21499, 14175, 16807, 18201, 18348, 20509, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 11989, 17667, 17667, 17667, 8899, 12011, 17667, 17667, 17667, 27007,
  12030, 12014, 10160, 14179, 12064, 22949, 8841, 14763, 17666, 17667, 17667, 23914, 26046, 17667, 19222, 21732, 22724,
  13236, 20279, 12097, 17667, 17667, 15530, 17667, 17667, 23918, 26043, 20029, 21732, 21732, 19505, 14062, 13787, 13787,
  24062, 17667, 17667, 17667, 17667, 17667, 23917, 26045, 20030, 21732, 21732, 21732, 24804, 13787, 13787, 21498, 17667,
  17667, 17667, 17667, 17667, 13685, 26972, 17451, 12163, 21732, 21733, 12837, 13787, 13787, 18546, 17667, 17667, 17667,
  17667, 24544, 12160, 21732, 14808, 13787, 21538, 17667, 17667, 13685, 25044, 21732, 18610, 21539, 17667, 10284, 25046,
  12167, 13787, 18549, 20543, 12166, 13787, 9182, 10826, 14360, 10827, 12155, 13537, 12160, 21499, 14175, 16807, 18201,
  18348, 20509, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 8791,
  27047, 17667, 17667, 9966, 21110, 20911, 20920, 21101, 27037, 9284, 17667, 27068, 11138, 27083, 22949, 8841, 14763,
  17666, 15999, 17667, 17667, 17667, 17667, 19222, 17667, 17667, 23549, 15534, 8860, 17667, 17667, 15530, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 8791, 17667, 17667, 17667, 8899, 17667, 17667, 9404, 17667,
  8881, 22095, 27105, 27142, 9539, 27120, 22949, 8841, 14763, 17666, 17667, 17667, 17667, 17667, 17667, 19222, 17667,
  17667, 23549, 15534, 8860, 17667, 17667, 15530, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  8791, 17667, 17667, 17667, 10869, 17667, 17667, 17667, 21518, 27168, 27201, 27216, 27253, 21520, 27231, 22949, 8841,
  14763, 17666, 9582, 17667, 17667, 17667, 17667, 19222, 17667, 17667, 23549, 15534, 8860, 17667, 17667, 15530, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 8791, 17667, 17667, 17667, 8899, 17667, 17667, 17667,
  17667, 8881, 17667, 17667, 17667, 17667, 27279, 22949, 8841, 14763, 17666, 17667, 17667, 23914, 26046, 17667, 19222,
  21732, 22724, 13236, 20279, 10192, 17667, 17667, 15530, 17667, 17667, 23918, 26043, 17667, 21732, 21732, 19505, 16135,
  13787, 13787, 24062, 17667, 17667, 17667, 17667, 17667, 23917, 26045, 20030, 21732, 21732, 21732, 24804, 13787, 13787,
  21498, 17667, 17667, 17667, 17667, 17667, 13685, 26972, 17451, 12163, 21732, 21733, 12837, 13787, 13787, 18546, 17667,
  17667, 17667, 17667, 24544, 12160, 21732, 14808, 13787, 21538, 17667, 17667, 13685, 25044, 21732, 18610, 21539, 17667,
  10284, 25046, 12167, 13787, 18549, 20543, 12166, 13787, 9182, 10826, 14360, 10827, 12155, 13537, 12160, 21499, 14175,
  16807, 18201, 18348, 20509, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 19187, 17667, 17667, 17667, 17667, 17667, 17667, 19188, 17667, 27316, 27305, 27332, 26771, 27339, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667,
  17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 17667, 51445, 51445, 51445, 49396, 49396, 51445, 51445,
  51445, 51445, 51445, 51445, 51445, 51445, 51445, 51445, 51445, 51445, 51445, 51445, 51445, 51445, 0, 51445, 51445, 0,
  49396, 51445, 51445, 51445, 51445, 51445, 51445, 51445, 51445, 51445, 51445, 51445, 51445, 51445, 51445, 287, 51445,
  51445, 51445, 36864, 38912, 51445, 51445, 51445, 51445, 34816, 51445, 51445, 51445, 51445, 51445, 51445, 51445, 51445,
  51445, 0, 0, 49396, 51445, 51445, 51445, 51445, 51445, 51445, 51445, 51445, 51445, 0, 51445, 51445, 51445, 51445,
  51445, 51445, 51445, 51445, 51445, 51445, 51445, 51445, 51445, 51445, 1, 8194, 3, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 0, 49396, 51445, 0, 0, 0, 0, 0, 0, 0, 0, 254, 255, 0, 258, 67584, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 462,
  27336, 0, 257, 258, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 122880, 0, 465, 466, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 1501, 45403, 45403, 0, 0, 36864, 38912, 0, 0, 0, 0, 34816, 0, 0, 0, 0, 0, 0, 0, 0, 20771, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 287, 0, 364, 364, 364, 364, 364, 364, 364, 364, 364, 364, 364, 364, 364, 364, 0, 364,
  364, 364, 364, 364, 364, 364, 364, 364, 0, 0, 0, 0, 0, 0, 0, 0, 108872, 0, 0, 0, 0, 0, 0, 0, 0, 153600, 0, 0, 0, 0, 0,
  0, 0, 0, 239616, 0, 0, 0, 0, 0, 0, 0, 0, 309248, 597, 0, 0, 0, 0, 0, 547, 465, 466, 0, 713, 4, 0, 0, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 18917, 255, 0, 254, 0, 257, 57344, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 462, 463, 713, 254, 257, 0,
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 125295, 0, 0, 57661, 38912, 0, 0, 0, 0, 34816, 0, 0, 0, 0, 0, 0, 0, 0,
  309756, 0, 45403, 45403, 45403, 45403, 45403, 45403, 399, 399, 399, 399, 399, 462, 465, 465, 465, 465, 465, 465, 465,
  465, 465, 399, 465, 1, 8194, 3, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30720, 0, 0, 0, 27113, 258, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 0, 0, 0, 0, 139264, 27338, 466, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 27333, 463, 0, 530659,
  8194, 3, 4, 0, 0, 234, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 593, 0, 0, 0, 399, 400, 0, 0, 59392, 0, 0, 0, 0, 0, 0, 0, 0,
  59392, 0, 0, 0, 59392, 59392, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 45403, 16785, 16785, 0, 0, 59392, 59392, 59392,
  0, 59392, 59392, 59392, 0, 0, 0, 0, 0, 0, 59392, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 59392, 0, 0, 0, 287, 0, 0, 0,
  71680, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63488, 63488, 0, 1, 8194, 3, 4, 0, 0, 0, 63488, 0, 0, 0, 0, 0, 0, 0, 0,
  0, 1085, 0, 0, 0, 1091, 17231, 16785, 0, 0, 36864, 38912, 63488, 0, 0, 0, 34816, 0, 0, 0, 0, 0, 0, 0, 0, 399360, 0, 0,
  399360, 0, 399360, 0, 0, 0, 0, 63488, 0, 0, 0, 0, 63488, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1371, 0, 0, 0, 0, 0, 0, 0, 0,
  63488, 0, 0, 63488, 63488, 63488, 63488, 63488, 63488, 63488, 63488, 63488, 63488, 0, 0, 0, 0, 983, 0, 0, 0, 0, 0,
  989, 0, 0, 0, 0, 0, 0, 339968, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1485, 0, 0, 0, 0, 0, 0, 63488, 1, 8194, 3, 4, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 0, 0, 0, 106496, 0, 106496, 0, 65536, 0, 36864, 38912, 0, 0, 0, 0, 34816, 0, 0, 0, 0, 0, 0, 0, 0,
  403456, 0, 403456, 0, 0, 0, 0, 0, 65536, 0, 65536, 65536, 65536, 0, 0, 0, 0, 0, 0, 0, 0, 65536, 0, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 0, 0, 760, 0, 0, 0, 1, 8194, 3, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 112640, 0, 0, 0, 0, 0, 318, 318,
  0, 0, 0, 0, 318, 0, 0, 0, 0, 0, 0, 0, 255, 0, 0, 0, 258, 0, 0, 0, 0, 490, 491, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  0, 0, 141312, 0, 715, 716, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 106496, 0, 0, 255, 258, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 0, 0, 0, 0, 403456, 0, 0, 36864, 67905, 0, 0, 0, 0, 34816, 0, 0, 0, 0, 0, 0, 0, 270, 0, 298, 0, 0, 0,
  0, 0, 0, 257, 27116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 407552, 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 292, 465, 27341, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 116736, 0, 0, 1, 8194, 3, 4, 0, 0, 0, 0,
  69632, 235, 0, 0, 0, 0, 0, 0, 301, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 67584, 0, 0, 0, 0, 0, 246, 0, 0, 69878, 246, 246,
  246, 246, 246, 293, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 69878, 246, 246, 246, 246, 246, 246,
  246, 36864, 38912, 246, 246, 246, 246, 34816, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246,
  246, 246, 288, 246, 246, 246, 246, 0, 69878, 246, 69878, 69878, 246, 246, 246, 246, 246, 69878, 69878, 246, 69878,
  69878, 69878, 69632, 69878, 69925, 69925, 69925, 69925, 69925, 69925, 69925, 69925, 69878, 69878, 246, 69878, 69878,
  69878, 69878, 69878, 69878, 69878, 0, 0, 0, 246, 246, 246, 246, 0, 0, 246, 246, 69878, 246, 246, 246, 246, 246, 246,
  246, 246, 246, 69878, 246, 0, 69878, 69878, 69878, 1, 8194, 3, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 243712, 0, 0, 0,
  0, 0, 578051, 287, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 486, 487, 0, 75776, 75776, 0, 75776, 75776, 75776, 75776,
  75776, 75776, 75776, 75776, 75776, 75776, 75776, 0, 75776, 75776, 75776, 0, 0, 0, 0, 0, 0, 75776, 75776, 0, 75776, 0,
  0, 75776, 0, 75776, 75776, 0, 0, 0, 0, 75776, 0, 0, 0, 0, 75776, 75776, 0, 8194, 3, 4, 0, 0, 0, 61440, 0, 0, 0, 0, 0,
  0, 302, 0, 0, 0, 0, 0, 0, 314, 0, 0, 75776, 75776, 75776, 75776, 75776, 75776, 75776, 75776, 75776, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 0, 75776, 0, 0, 0, 0, 0, 0, 0, 100352, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 301, 77824, 77824,
  77824, 77824, 77824, 77824, 77824, 77824, 77824, 77824, 77824, 77824, 77824, 77824, 0, 77824, 14777, 1, 8194, 3, 4, 0,
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 399360, 0, 287, 0, 77824, 79872, 77824, 77824, 77824, 79872, 77824, 77824, 77824, 0,
  14777, 0, 0, 14777, 0, 0, 0, 0, 0, 63488, 63488, 63488, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1253, 0, 0, 0, 0, 0, 0, 81920,
  81920, 81920, 81920, 81920, 81920, 81920, 81920, 81920, 81920, 81920, 81920, 81920, 81920, 0, 81920, 0, 0, 287, 287,
  0, 764, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 254, 0, 0, 0, 0, 0, 0, 36864, 38912, 0, 0, 0, 0, 34816, 83968, 83968, 0,
  83968, 0, 83968, 83968, 1, 8194, 3, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 0, 0, 0, 0, 83968, 83968, 83968, 83968,
  83968, 83968, 83968, 83968, 83968, 83968, 83968, 83968, 83968, 83968, 0, 83968, 0, 83968, 83968, 0, 83968, 0, 0,
  83968, 0, 83968, 83968, 83968, 83968, 83968, 83968, 83968, 83968, 83968, 83968, 83968, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 83968, 0, 0, 0, 0, 0, 1, 228, 3, 4, 0, 0, 0, 0, 0, 0, 236, 0, 0, 0, 0, 0, 0, 45403, 0, 0, 16785, 16826,
  16785, 16785, 16826, 16785, 16785, 86016, 86016, 86016, 86016, 86016, 86016, 86016, 86016, 86016, 86016, 86016, 86016,
  86016, 86016, 0, 86016, 465, 466, 0, 0, 4, 41191, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 259, 260, 0, 0, 0, 0, 724, 725, 0,
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 789, 0, 0, 0, 0, 1050, 0, 0, 0, 0, 45403, 45403, 45403, 45403, 45403, 45403,
  45403, 45403, 45403, 45403, 352603, 0, 0, 16785, 16785, 17823, 16785, 16785, 16785, 16785, 16785, 16785, 0, 0, 0, 0,
  16826, 16826, 16826, 0, 0, 0, 0, 0, 0, 0, 0, 16785, 16785, 16785, 16785, 18107, 1489, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  0, 0, 45403, 45403, 45403, 16785, 16785, 17916, 16785, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826,
  16826, 16826, 16826, 16826, 16826, 16826, 381370, 16785, 18050, 18051, 16785, 16785, 18054, 16785, 16785, 16785,
  16785, 16826, 16826, 16826, 16826, 16826, 18062, 18063, 18064, 16826, 16826, 16826, 16826, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  16785, 16785, 16785, 16785, 17806, 16785, 16785, 16785, 16785, 16785, 18077, 16785, 16785, 16785, 16785, 16785, 18083,
  16785, 16785, 16826, 18087, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 305594, 16826, 16826, 16826, 16826,
  16826, 16826, 16826, 16826, 16826, 16826, 17312, 16826, 16826, 16826, 16826, 16826, 18093, 16826, 16826, 0, 0, 0, 0,
  0, 0, 0, 0, 18103, 16785, 16785, 16785, 16785, 0, 0, 0, 0, 0, 0, 0, 0, 16785, 16785, 16999, 16785, 16785, 16785,
  16785, 16785, 16785, 18113, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 0, 1684, 0, 1686, 0, 0,
  1689, 0, 1691, 16785, 0, 90579, 1, 8194, 3, 4, 41191, 41191, 47337, 0, 0, 0, 0, 0, 0, 0, 282, 0, 0, 0, 0, 0, 0, 287,
  0, 287, 0, 23045, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 803, 804, 465, 466, 92160, 0, 4, 41191, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 299, 0, 0, 0, 0, 94573, 0, 94573, 94573, 94573, 0, 94573, 94573, 94573, 0, 0, 0, 0, 0, 0, 0, 285, 0, 0,
  0, 0, 285, 0, 0, 285, 94573, 0, 1, 8194, 3, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 399, 0, 0, 0, 0, 0, 20736, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 260, 260, 0, 20771, 1, 8194, 3, 4, 41191, 41191, 47337, 0, 0, 0, 0, 0, 0, 0, 303, 0, 0,
  0, 0, 303, 0, 0, 303, 287, 23045, 20771, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1214, 0, 465, 466, 23045, 0, 4,
  41191, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 512, 513, 0, 287, 287, 0, 0, 287, 287, 23045, 25340, 0, 0, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 540, 0, 0, 0, 0, 0, 0, 997, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1244, 0, 785, 1037, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 0, 0, 0, 287, 254, 0, 0, 0, 1201, 0, 0, 0, 1207, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1570, 0, 0, 0, 45403,
  45403, 45403, 0, 0, 979, 1218, 0, 0, 0, 0, 985, 1220, 0, 0, 0, 0, 991, 1222, 1322, 0, 0, 0, 0, 1142, 1324, 0, 0, 0, 0,
  16826, 16826, 16826, 16826, 16826, 16826, 17543, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 17550, 16826, 1201,
  1363, 0, 0, 0, 0, 1207, 1365, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63488, 0, 0, 0, 0, 0, 63488, 0, 1218, 0, 1220, 0, 1222, 0,
  1224, 0, 0, 0, 0, 0, 0, 0, 0, 0, 77824, 0, 0, 0, 0, 0, 0, 0, 0, 1283, 0, 1285, 0, 16785, 16785, 16785, 16785, 16785,
  16785, 16785, 16785, 16785, 16785, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 1361, 0, 1363, 0, 1365, 0, 0, 0,
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 348160, 0, 0, 1, 8194, 3, 4, 41191, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 405504, 287,
  0, 0, 0, 260, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 364, 259, 260, 0, 259, 0, 260, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  0, 0, 554, 0, 0, 557, 0, 259, 0, 1, 8194, 3, 4, 41191, 41191, 471, 0, 0, 0, 0, 0, 0, 0, 312, 0, 0, 0, 0, 312, 0, 0,
  312, 257, 258, 102400, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1368, 0, 578052, 0, 0, 0, 73728, 0, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 248, 0, 0, 0, 608, 608, 608, 608, 0, 0, 0, 0, 0, 0, 0, 0, 608, 608, 608, 608, 608, 608, 608, 608, 608,
  665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 0, 608, 608, 608, 608, 608, 608, 439, 440, 664, 665, 665, 665, 665,
  665, 665, 665, 665, 665, 665, 665, 0, 0, 0, 0, 0, 0, 0, 0, 0, 578052, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 514, 287,
  287, 608, 608, 608, 0, 0, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 665, 665, 665, 608,
  608, 608, 665, 0, 0, 665, 0, 0, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 0, 0,
  0, 665, 665, 665, 665, 608, 0, 0, 608, 0, 665, 0, 0, 665, 0, 0, 0, 0, 0, 1481, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  399360, 0, 399360, 0, 399360, 665, 665, 665, 665, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 439, 608, 608, 608,
  608, 608, 608, 608, 608, 608, 0, 0, 0, 0, 665, 665, 665, 0, 0, 0, 0, 0, 0, 0, 0, 608, 608, 608, 608, 608, 608, 608,
  608, 608, 608, 608, 608, 608, 608, 608, 608, 0, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 665, 665, 665, 665,
  665, 665, 665, 665, 665, 665, 0, 0, 0, 0, 608, 608, 608, 608, 608, 608, 665, 665, 665, 0, 0, 0, 608, 608, 608, 608,
  608, 608, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 462, 463, 0, 665, 665, 0, 0, 0, 608, 608,
  608, 608, 665, 665, 665, 665, 0, 608, 608, 0, 0, 0, 0, 0, 0, 0, 0, 0, 665, 665, 665, 665, 665, 665, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 608, 665, 665, 608, 665, 608, 665, 608, 665, 608, 665, 0, 0, 0, 0, 0, 0, 305, 0, 0, 0, 0, 0, 0, 0, 0, 0, 510,
  0, 0, 0, 0, 287, 287, 0, 0, 36864, 38912, 0, 0, 0, 0, 34816, 0, 0, 0, 0, 106496, 0, 0, 0, 0, 0, 73728, 0, 0, 0, 0, 0,
  0, 0, 254, 255, 0, 106496, 106496, 106496, 0, 0, 0, 0, 0, 0, 106496, 0, 0, 106496, 0, 0, 106496, 106496, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1376, 0, 106496, 106496, 0, 106496, 106496, 106496, 106496, 106496, 106496, 106496,
  106496, 106496, 106496, 106496, 0, 106496, 106496, 1, 8194, 3, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 608, 0, 0, 608, 0,
  106496, 106496, 106496, 106496, 106496, 106496, 106496, 106496, 106496, 0, 0, 0, 0, 0, 0, 0, 399, 0, 0, 0, 399, 0,
  400, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 287, 255, 43008, 0, 0, 0, 28672, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  249, 0, 0, 0, 0, 0, 254, 0, 0, 0, 254, 0, 255, 0, 0, 0, 255, 0, 257, 0, 0, 0, 0, 1053, 0, 0, 46111, 168283, 45403,
  45403, 45403, 45403, 215387, 45403, 46118, 0, 0, 257, 0, 258, 0, 0, 0, 258, 0, 0, 0, 0, 0, 0, 0, 463, 0, 0, 0, 0, 466,
  0, 0, 0, 465, 0, 0, 0, 465, 0, 466, 0, 0, 0, 466, 0, 0, 0, 0, 0, 0, 45403, 0, 0, 16802, 16843, 16802, 16802, 16843,
  16802, 16802, 0, 254, 0, 255, 0, 257, 0, 258, 0, 0, 0, 0, 0, 0, 0, 0, 0, 272384, 0, 0, 786, 0, 0, 0, 108910, 108910,
  108910, 108910, 108910, 108910, 108910, 108910, 108910, 108910, 108910, 108910, 108910, 108910, 0, 108910, 109012, 1,
  8194, 3, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 465, 466, 0, 116736, 4,
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 743, 0, 0, 0, 1, 8194, 3, 4, 0, 0, 0, 0, 0, 0, 0, 122880, 0, 0, 0, 0, 0, 0, 0, 0,
  0, 122880, 122880, 122880, 122880, 122880, 122880, 122880, 122880, 122880, 122880, 122880, 122880, 122880, 122880, 0,
  122880, 122880, 122880, 122880, 122880, 122880, 122880, 122880, 122880, 0, 0, 0, 0, 0, 0, 0, 537, 0, 0, 0, 0, 0, 0, 0,
  0, 1030, 0, 0, 0, 0, 0, 0, 0, 257, 258, 0, 104448, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 541, 0, 0, 465, 466, 0,
  118784, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 785, 0, 0, 0, 1, 8194, 3, 4, 0, 0, 0, 0, 0, 0, 0, 0, 124928, 0, 0, 0,
  124928, 0, 0, 0, 0, 125295, 125295, 125295, 125295, 125295, 125295, 125295, 125295, 125295, 125295, 125295, 125295,
  125295, 125295, 0, 125295, 125295, 125295, 125295, 125295, 125295, 125295, 125295, 125295, 0, 0, 0, 0, 0, 0, 0, 550,
  0, 0, 0, 0, 0, 0, 0, 0, 0, 1031, 0, 0, 0, 0, 0, 0, 465, 466, 0, 0, 0, 0, 0, 88064, 143360, 0, 0, 0, 0, 0, 0, 0, 748,
  0, 0, 0, 0, 0, 0, 0, 17231, 1, 8194, 534757, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 237, 0, 0, 0, 0, 0, 0, 0, 0, 131072, 0, 0,
  0, 131072, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 784, 0, 788, 0, 0, 0, 0, 1, 8194, 534757, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  0, 800, 0, 0, 0, 0, 465, 466, 0, 120832, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 839, 843, 0, 0, 0, 135168, 1, 8194, 3,
  4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1008, 0, 0, 0, 0, 1, 8194, 3, 4, 41191, 47337, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1241, 0, 0, 0, 0, 0, 0, 47337, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16785, 0, 0, 0, 0, 45403, 0, 45403, 0, 0,
  45403, 0, 45403, 45403, 0, 45403, 0, 0, 0, 1282, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1044, 1045, 0, 1047, 16785,
  16826, 1, 8194, 3, 4, 41191, 41191, 47337, 0, 0, 0, 0, 0, 0, 0, 781, 0, 0, 0, 0, 0, 0, 0, 0, 797, 0, 0, 0, 0, 0, 0, 0,
  465, 466, 0, 0, 4, 41191, 47822, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1226, 0, 0, 0, 0, 1231, 0, 0, 0, 1218, 0, 0, 0, 0, 0,
  1220, 0, 0, 0, 0, 0, 1222, 1322, 0, 0, 0, 0, 0, 1324, 0, 0, 0, 0, 16826, 16826, 16826, 16826, 16826, 16826, 17568,
  16826, 16826, 16826, 16826, 0, 0, 0, 0, 0, 0, 0, 0, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785,
  16785, 16785, 16785, 16785, 16785, 16826, 16826, 16826, 0, 1363, 0, 0, 0, 0, 0, 1365, 0, 0, 0, 0, 0, 0, 0, 0, 282, 0,
  0, 0, 0, 0, 0, 0, 0, 0, 0, 1565, 0, 0, 0, 0, 0, 0, 0, 0, 0, 45403, 45403, 45403, 45403, 46115, 45403, 45403, 45403,
  45403, 0, 1037, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1043, 0, 0, 0, 0, 0, 729, 733, 0, 0, 737, 741, 0, 0, 0, 0, 0, 0, 98304, 0,
  0, 0, 0, 0, 0, 254, 255, 0, 0, 0, 1257, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 45403, 45403, 45403, 45403, 45632, 45403,
  287, 0, 518, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16797, 0, 0, 0, 287, 287, 518, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  0, 840, 844, 0, 17231, 465, 466, 0, 0, 4, 231, 47822, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1473, 1474, 0, 0, 0, 0, 16785,
  16826, 1, 8194, 3, 4, 41191, 41430, 47337, 0, 0, 0, 0, 0, 0, 0, 836, 0, 0, 0, 0, 0, 0, 0, 17231, 0, 0, 36864, 38912,
  0, 0, 0, 0, 34816, 0, 0, 0, 0, 331, 0, 0, 0, 0, 0, 75776, 0, 0, 0, 0, 75776, 75776, 0, 0, 0, 0, 0, 548, 0, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 285, 286, 0, 0, 287, 0, 0, 0, 0, 1492, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 45403, 45403, 45403, 45403,
  225627, 45403, 1, 8194, 3, 4, 41192, 47337, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1265, 0, 0, 45403, 45403, 139264, 0,
  139264, 139264, 139264, 0, 139264, 139264, 139264, 0, 0, 0, 0, 0, 0, 0, 981, 0, 0, 0, 987, 0, 0, 0, 993, 139264, 0, 1,
  8194, 3, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1373, 0, 0, 0, 0, 1, 8194, 3, 230, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 238, 0,
  0, 0, 0, 1235, 0, 0, 0, 0, 0, 0, 0, 1242, 0, 0, 0, 0, 0, 49396, 49396, 49396, 49396, 51445, 0, 0, 0, 0, 0, 51445,
  141312, 141312, 141312, 0, 0, 0, 0, 0, 0, 141312, 0, 0, 141312, 0, 0, 141312, 141312, 0, 141312, 141312, 141312,
  141312, 141312, 141312, 141312, 141312, 141312, 141312, 141312, 0, 141312, 141312, 1, 8194, 3, 1061333, 0, 0, 0, 0, 0,
  0, 0, 473, 0, 0, 0, 0, 0, 90402, 90579, 90579, 90579, 90579, 90579, 90579, 90579, 90579, 90579, 0, 141312, 141312,
  141312, 141312, 141312, 141312, 141312, 141312, 141312, 0, 0, 0, 0, 0, 0, 0, 1004, 0, 0, 0, 0, 0, 0, 0, 0, 983, 0, 0,
  0, 989, 0, 0, 0, 465, 466, 0, 0, 1061333, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 841, 845, 0, 17231, 0, 0, 47337, 0, 0,
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 261, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 608, 608, 261, 0, 261, 311, 261, 0, 0,
  0, 0, 0, 0, 313, 296, 0, 0, 296, 0, 261, 261, 296, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1572, 0, 46630, 45403, 45403, 0,
  0, 36864, 38912, 296, 0, 0, 0, 34816, 0, 0, 0, 0, 0, 0, 338, 338, 346, 45404, 368, 45404, 368, 368, 45404, 346, 45404,
  45404, 346, 45404, 368, 346, 346, 368, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 16786, 346, 421, 346,
  346, 346, 421, 45404, 346, 346, 16813, 16827, 16813, 16813, 16827, 16813, 16813, 16813, 16813, 16813, 16813, 16827,
  16827, 16827, 16827, 16827, 16827, 16827, 16827, 16827, 16813, 16813, 16827, 1, 8194, 3, 4, 41191, 41191, 47337, 0, 0,
  0, 0, 0, 474, 475, 257, 258, 0, 0, 0, 493, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16826, 16826, 16826, 16826, 16826, 287, 0,
  0, 0, 0, 520, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16826, 16826, 17712, 16826, 16826, 0, 493, 0, 0, 0, 0, 0, 0, 0, 0, 552,
  0, 0, 0, 0, 558, 591, 0, 0, 0, 0, 0, 0, 506, 0, 0, 0, 0, 0, 0, 0, 0, 0, 287, 287, 16785, 16785, 16995, 16785, 16785,
  16785, 16785, 16785, 16785, 16785, 17013, 16785, 17016, 16785, 17019, 16785, 16785, 16785, 0, 901, 905, 0, 15243,
  17231, 16826, 16826, 16826, 16826, 16826, 17297, 16826, 0, 0, 0, 178176, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1037, 0,
  0, 0, 16785, 17025, 16785, 16785, 0, 0, 0, 520, 0, 538, 520, 0, 16785, 16995, 16785, 16785, 0, 0, 0, 0, 0, 0, 0, 0,
  15243, 16826, 16826, 16826, 16826, 17536, 16785, 16785, 17037, 17016, 17019, 16785, 439, 440, 0, 16826, 16826, 17053,
  16826, 16826, 16826, 16826, 0, 1359, 0, 0, 0, 0, 0, 1361, 0, 0, 0, 0, 0, 728, 732, 0, 0, 736, 740, 0, 0, 0, 0, 0, 0,
  45403, 0, 0, 16804, 16845, 16804, 16804, 16845, 16804, 16804, 16826, 16826, 16826, 17073, 16826, 17077, 16826, 17080,
  16826, 16826, 17090, 16826, 16826, 462, 463, 0, 0, 0, 0, 1381, 0, 0, 0, 1382, 0, 0, 1385, 0, 0, 0, 0, 0, 1219, 0, 729,
  0, 0, 0, 1221, 0, 733, 0, 0, 465, 466, 0, 0, 4, 41191, 47822, 0, 0, 0, 0, 0, 722, 0, 0, 0, 0, 0, 1659, 0, 0, 0, 0, 0,
  0, 0, 45403, 18048, 16785, 0, 0, 0, 793, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 543, 0, 0, 0, 0, 1025, 0, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 0, 0, 0, 0, 16804, 0, 0, 1078, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17231, 16785, 16785, 16785, 0, 902,
  906, 0, 15243, 17231, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 17840, 16826, 16826, 16826, 16826,
  16826, 16826, 16826, 16826, 16826, 16826, 17722, 16826, 16826, 246202, 16826, 16826, 46326, 45403, 45403, 45403,
  45403, 45403, 45403, 46330, 45403, 45403, 45403, 45403, 45403, 45403, 45403, 45403, 45403, 45403, 46128, 45403, 0, 0,
  0, 0, 0, 0, 0, 16785, 16785, 17673, 16785, 17674, 16785, 17675, 16785, 16785, 16785, 16785, 16785, 16785, 439, 440, 0,
  16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 17546, 16826, 16826, 16826, 16826, 16826, 16785,
  16785, 16785, 17682, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785,
  371089, 16785, 1322, 0, 0, 0, 0, 0, 1324, 0, 0, 0, 0, 16826, 16826, 16826, 17713, 16826, 0, 0, 1619, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 0, 1625, 0, 0, 0, 0, 997, 1224, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 553, 0, 0, 0, 559, 17714, 16826, 16826,
  17716, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 17726, 0, 1218, 0, 1220, 0, 1222,
  0, 1224, 0, 0, 1372, 0, 0, 0, 0, 1377, 0, 0, 0, 1393, 0, 0, 0, 0, 0, 1397, 0, 0, 0, 0, 0, 0, 439, 663, 0, 0, 0, 0, 0,
  0, 0, 0, 0, 1472, 0, 0, 0, 0, 0, 0, 1361, 0, 1363, 0, 1365, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1477, 0, 0, 0, 1479, 0, 0,
  0, 1483, 0, 0, 0, 0, 0, 0, 0, 0, 283, 0, 0, 0, 0, 0, 287, 0, 16785, 16785, 16785, 16785, 17905, 16785, 16785, 16785,
  16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 149055, 16826, 16826, 17914, 16785, 16785,
  16785, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 17844, 16826,
  16826, 16826, 17987, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 17997, 16826, 16826, 0, 0,
  0, 16785, 16785, 16785, 16785, 16826, 16826, 16826, 16826, 0, 16785, 18195, 0, 1741, 0, 0, 1744, 0, 16785, 16785,
  16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 17500, 16785, 16785, 16785, 16785, 16785, 1767, 16785, 16785,
  16785, 16785, 16785, 16785, 16785, 16785, 16785, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826,
  0, 0, 262, 263, 264, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 544, 0, 0, 0, 0, 36864, 38912, 0, 322, 322, 0, 34816, 0,
  0, 0, 0, 0, 0, 0, 1029, 0, 0, 1032, 0, 0, 0, 1036, 0, 0, 0, 322, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16785, 0, 0, 0, 0,
  1559, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1034, 0, 0, 0, 0, 1037, 0, 0, 0, 0, 0, 0, 1041, 0, 0, 0, 0, 0, 0, 0, 1040,
  0, 0, 0, 0, 0, 0, 1046, 0, 16826, 17563, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 0, 0, 0, 0, 0,
  0, 0, 0, 0, 47822, 0, 972, 0, 0, 1392, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 45403, 45403, 46631, 0, 0, 0, 45403,
  46464, 45403, 45403, 45403, 45403, 45403, 45403, 45403, 45403, 45403, 1415, 0, 0, 0, 0, 1566, 0, 0, 0, 1569, 0, 0, 0,
  0, 45403, 45403, 45403, 46466, 45403, 45403, 45403, 45403, 45403, 45403, 45403, 0, 0, 0, 16785, 16785, 16785, 16785,
  16785, 209297, 16785, 16785, 16785, 0, 0, 1283, 0, 1285, 0, 16785, 16785, 17804, 16785, 16785, 16785, 16785, 16785,
  16785, 16785, 17008, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 17498, 16785, 16785, 16785, 16785, 16785,
  16785, 16785, 17832, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826,
  16826, 16826, 17334, 1, 8194, 3, 4, 41191, 47337, 0, 0, 0, 0, 0, 0, 0, 0, 0, 239, 239, 0, 0, 0, 0, 0, 0, 0, 240, 0, 0,
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 746, 267, 265, 36864, 38912, 0, 323, 323, 324, 34816, 324, 329, 324, 329, 0,
  329, 329, 340, 344, 344, 45405, 369, 45405, 369, 369, 45405, 344, 45405, 45405, 344, 45405, 388, 344, 344, 392, 344,
  344, 344, 397, 397, 398, 398, 398, 398, 398, 398, 16787, 398, 344, 398, 398, 398, 344, 45405, 398, 398, 16814, 16828,
  16814, 16814, 16828, 16814, 16814, 16814, 16814, 16814, 16814, 16828, 16828, 16828, 16828, 16828, 16828, 16828, 16828,
  16828, 16814, 16814, 16828, 1, 8194, 3, 4, 41191, 41191, 47337, 0, 0, 0, 0, 0, 0, 0, 1083, 0, 0, 0, 1089, 0, 0, 17231,
  16785, 16785, 16785, 16785, 16785, 17040, 16785, 439, 440, 0, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826,
  16826, 17311, 16826, 16826, 16826, 16826, 16826, 16826, 0, 0, 749, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 45403,
  46325, 0, 0, 287, 287, 0, 0, 0, 0, 0, 768, 749, 0, 0, 0, 0, 0, 0, 45403, 0, 0, 16820, 16838, 16820, 16820, 16838,
  16820, 16820, 805, 0, 0, 0, 0, 0, 45403, 45864, 45403, 45403, 45403, 45403, 45403, 45403, 45403, 45872, 830, 0, 0, 0,
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17231, 17232, 17233, 16785, 16785, 16785, 17238, 16785, 17241, 16785, 16785, 16785,
  16785, 17245, 16785, 16785, 16785, 0, 0, 0, 0, 15243, 17231, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826,
  16826, 16826, 17841, 16826, 16826, 16826, 16826, 16826, 16826, 17303, 16826, 16826, 16826, 16826, 17308, 16826, 16826,
  16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 17315, 16826, 278970, 16826, 0, 0, 1051, 0, 0,
  1054, 0, 45403, 45403, 45403, 45403, 45403, 46116, 45403, 45403, 45403, 45403, 45403, 45403, 45403, 45403, 46331,
  311643, 46332, 45403, 45403, 45403, 45403, 45403, 45403, 45403, 45403, 45403, 46127, 45403, 45403, 0, 0, 0, 0, 368640,
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 292, 0, 0, 0, 0, 0, 45403, 45403, 45403, 46562, 45403, 45403, 0, 1510, 0, 16785, 16785,
  16785, 16785, 16785, 16785, 16785, 16785, 16785, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16785,
  16785, 16785, 17903, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785,
  17247, 16785, 16826, 16826, 17928, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 0, 0, 0, 0,
  1765, 0, 0, 0, 0, 1558, 0, 0, 1561, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 65536, 0, 0, 0, 0, 0, 0, 0, 45403, 45403, 46633,
  45403, 0, 0, 1579, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 17970, 17971, 16785, 16785, 16785, 16785,
  16785, 16785, 16785, 16785, 17978, 16785, 16785, 16785, 16826, 16826, 16826, 0, 0, 0, 0, 0, 0, 0, 0, 16785, 18104,
  16785, 16785, 16785, 0, 0, 0, 0, 15243, 17231, 16826, 16826, 16826, 16826, 16826, 16826, 17301, 1740, 0, 0, 0, 0, 0,
  16785, 16785, 16785, 16785, 16785, 18134, 16785, 16785, 16785, 16785, 0, 0, 0, 0, 0, 0, 0, 540, 16785, 16785, 16785,
  16785, 0, 0, 0, 0, 0, 274912, 0, 0, 16785, 16785, 16998, 16785, 16826, 16826, 16826, 18141, 16826, 16826, 16826,
  16826, 16826, 16826, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16785, 16826, 18196, 16785, 16826, 16785, 16826, 16785, 16826, 16785,
  16826, 0, 0, 0, 0, 0, 0, 0, 0, 0, 380928, 0, 0, 0, 0, 0, 0, 269, 36864, 38912, 0, 298, 298, 0, 34816, 0, 0, 0, 0, 332,
  0, 339, 341, 341, 341, 45406, 370, 45406, 370, 370, 45406, 341, 45406, 45406, 341, 45406, 370, 341, 390, 390, 393,
  390, 390, 390, 390, 390, 390, 390, 390, 390, 390, 390, 16788, 390, 390, 390, 390, 390, 390, 45406, 390, 390, 16815,
  16829, 16815, 16815, 16829, 16815, 16815, 16815, 16815, 16815, 16815, 16829, 16829, 16829, 16829, 16829, 16829, 16829,
  16829, 16829, 16815, 16815, 16829, 1, 8194, 3, 4, 41191, 41191, 47337, 0, 0, 0, 0, 0, 0, 0, 1251, 0, 0, 0, 0, 1037, 0,
  0, 0, 45403, 45635, 45403, 45403, 45403, 45403, 45403, 45403, 45403, 45403, 45403, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1284, 0,
  841, 0, 0, 0, 16785, 17008, 16785, 16785, 16785, 16785, 439, 440, 0, 16826, 16826, 16826, 16826, 16826, 16826, 16826,
  16826, 16826, 17545, 16826, 16826, 16826, 16826, 16826, 16826, 17067, 16826, 16826, 16826, 16826, 16826, 16826, 16826,
  16826, 16826, 16826, 16826, 16826, 462, 463, 0, 0, 0, 0, 1629, 45403, 178523, 46686, 45403, 45403, 0, 16785, 16785,
  178577, 18016, 18017, 465, 466, 0, 0, 4, 41191, 47822, 0, 0, 0, 0, 721, 0, 0, 0, 0, 0, 730, 734, 0, 0, 738, 742, 0, 0,
  0, 0, 0, 0, 356352, 0, 0, 0, 0, 0, 0, 0, 0, 0, 481, 0, 0, 0, 254, 255, 0, 774, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  0, 0, 790, 0, 0, 0, 284672, 0, 0, 285393, 0, 0, 0, 0, 0, 0, 0, 0, 17231, 151953, 16785, 16785, 16785, 16785, 16785,
  16785, 16785, 16785, 16785, 223633, 16785, 16785, 16785, 16785, 16785, 16785, 439, 440, 0, 16826, 16826, 16826, 16826,
  225722, 16826, 16826, 16785, 16785, 16785, 285540, 16785, 16785, 17255, 16785, 16785, 16785, 16785, 16785, 16785,
  16785, 16785, 16785, 1322, 0, 1324, 0, 16826, 16826, 17831, 16826, 16826, 16826, 16826, 223674, 16826, 16826, 16826,
  16826, 16826, 16826, 16826, 16826, 16826, 16826, 285605, 16826, 17319, 16826, 17321, 16826, 16826, 16826, 16826,
  16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 18038, 16826, 0, 0, 0, 1248, 0, 0, 0, 0, 0, 0,
  0, 0, 1037, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 287, 287, 0, 0, 0, 16785, 16785, 16785, 176529, 16785, 16785,
  16785, 16785, 16785, 16785, 16785, 16785, 16785, 1322, 0, 1324, 0, 16826, 17830, 16826, 17692, 17693, 16785, 16785,
  16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 0, 0, 0, 0, 16826, 16826, 16826, 1322, 0,
  0, 0, 0, 0, 1324, 0, 0, 0, 0, 16826, 16826, 16826, 16826, 176570, 17740, 17741, 16826, 16826, 0, 1359, 0, 0, 0, 0, 0,
  1361, 0, 0, 0, 0, 0, 795, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 270, 0, 0, 0, 0, 1404, 1405, 0, 46463, 45403, 45403, 45403,
  45403, 45403, 45403, 45403, 45403, 45403, 45403, 0, 0, 0, 17896, 16785, 16785, 16785, 16785, 16785, 16785, 0, 0, 1283,
  0, 1285, 0, 16785, 17803, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 17513, 16785, 16785, 16785, 16785,
  16785, 16785, 17518, 16826, 16826, 16826, 17847, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826,
  1359, 0, 0, 0, 0, 59392, 0, 59392, 59392, 0, 0, 0, 59392, 0, 59392, 59392, 0, 530659, 8194, 3, 4, 0, 0, 0, 0, 71680,
  0, 0, 0, 0, 0, 0, 17802, 16785, 16785, 17805, 16785, 16785, 16785, 16785, 229777, 16785, 45403, 45403, 46561, 45403,
  45403, 45403, 0, 0, 0, 16785, 16785, 16785, 16785, 16785, 16785, 17900, 16785, 16785, 16785, 16785, 16785, 313745,
  16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 17701, 16785, 16785, 16785, 17705, 0, 16785,
  16785, 16785, 16785, 16785, 381329, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16826, 16826, 18115,
  16826, 16826, 16826, 16826, 16826, 16826, 16826, 0, 295, 0, 297, 0, 0, 0, 0, 0, 0, 0, 271, 297, 274, 274, 295, 0, 0,
  0, 0, 77824, 0, 77824, 77824, 0, 0, 0, 0, 0, 0, 77824, 0, 0, 77824, 0, 14777, 14777, 14777, 14777, 14777, 14777,
  14777, 14777, 14777, 77824, 0, 271, 295, 0, 295, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1009, 0, 0, 0, 0, 271, 36864,
  38912, 0, 0, 0, 0, 34816, 0, 0, 274, 273, 0, 273, 273, 342, 342, 342, 45407, 371, 45407, 380, 371, 45407, 383, 45407,
  45407, 383, 45407, 371, 383, 383, 371, 395, 395, 395, 395, 395, 395, 395, 395, 395, 395, 395, 16789, 395, 422, 395,
  395, 395, 422, 45407, 395, 395, 16816, 16830, 16816, 16816, 16830, 16816, 16816, 16816, 16816, 16816, 16816, 16830,
  16830, 16830, 16830, 16830, 16830, 16830, 16830, 16830, 16816, 16816, 16830, 1, 8194, 3, 4, 41191, 41191, 47337, 0, 0,
  0, 0, 0, 0, 0, 1261, 0, 0, 0, 0, 0, 0, 45403, 45403, 45403, 45403, 45403, 207195, 45403, 45403, 45403, 45403, 257,
  258, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 499, 500, 0, 0, 0, 0, 0, 151552, 151899, 45403, 45403, 45403, 45403, 45403, 45403,
  45403, 223579, 45403, 287, 0, 518, 0, 0, 0, 0, 0, 0, 523, 524, 0, 0, 527, 528, 0, 0, 0, 0, 81920, 0, 81920, 81920, 0,
  0, 0, 0, 0, 0, 81920, 81920, 1, 8194, 3, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 247, 0, 0, 0, 0, 560, 0, 562, 0, 564, 0,
  0, 0, 0, 0, 45403, 45403, 45403, 45627, 45403, 45403, 45403, 45403, 45403, 45403, 45877, 45403, 45403, 45403, 45403,
  45403, 45403, 45403, 0, 0, 0, 16785, 16785, 16785, 16785, 17967, 16785, 16785, 16785, 16785, 242011, 45403, 275013,
  45403, 293211, 45403, 45641, 45403, 45403, 45403, 45403, 0, 0, 0, 0, 0, 0, 0, 1283, 0, 0, 0, 0, 0, 1285, 0, 0, 0, 0,
  241664, 0, 274432, 0, 292864, 0, 0, 0, 0, 292864, 0, 0, 241664, 0, 274912, 0, 0, 0, 564, 0, 0, 523, 0, 0, 0, 0, 0,
  399, 400, 16785, 16785, 16785, 16998, 16785, 16785, 242065, 16785, 275059, 16785, 293265, 16785, 16785, 17018, 17020,
  16785, 16785, 16785, 767, 0, 17269, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 18023,
  16785, 16785, 16785, 16826, 16826, 16785, 16785, 293265, 16785, 17020, 17042, 439, 440, 0, 16826, 16826, 16826, 17056,
  16826, 16826, 242106, 16826, 275119, 16826, 293306, 16826, 16826, 17079, 17082, 17086, 16826, 16826, 16826, 16826,
  462, 463, 0, 0, 0, 0, 86016, 0, 86016, 86016, 0, 0, 0, 0, 0, 0, 86016, 86016, 1, 0, 3, 4, 41191, 41191, 47337, 0, 0,
  472, 0, 0, 0, 0, 0, 592, 0, 0, 592, 0, 0, 0, 0, 0, 399, 400, 762, 0, 287, 287, 518, 0, 0, 0, 0, 0, 0, 0, 0, 771, 0, 0,
  0, 0, 0, 303104, 0, 0, 0, 0, 0, 0, 0, 0, 287, 287, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 462, 463, 0, 16785, 17267,
  16785, 0, 0, 16785, 16785, 16785, 17272, 16785, 16785, 17275, 16785, 16785, 17257, 16785, 16785, 16785, 830, 0, 16785,
  16785, 17271, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 17257, 16785, 16785, 16785, 16785, 16785, 17263,
  16785, 16826, 16826, 17304, 16826, 16826, 17307, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 17316, 16826, 16826,
  0, 0, 0, 16785, 16785, 16785, 16785, 16826, 16826, 16826, 16826, 0, 201105, 16785, 16826, 16826, 17338, 16826, 0, 0,
  0, 0, 0, 0, 0, 0, 0, 47822, 167936, 0, 0, 0, 0, 94573, 0, 94573, 94573, 0, 0, 0, 0, 0, 0, 94573, 0, 0, 0, 0, 0, 0,
  94573, 94573, 94573, 94573, 94573, 0, 94573, 0, 0, 975, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 129024, 0, 0, 0,
  1013, 0, 1015, 1016, 0, 1018, 0, 0, 0, 0, 0, 0, 1022, 0, 0, 0, 0, 108910, 0, 108910, 108910, 0, 108910, 0, 0, 108910,
  0, 108910, 108910, 108910, 108910, 108910, 108910, 108910, 108910, 108910, 0, 0, 0, 0, 0, 0, 0, 508, 509, 0, 0, 0, 0,
  0, 287, 287, 45403, 45403, 45403, 46121, 45403, 46122, 45403, 45403, 45403, 45403, 45403, 45403, 0, 1075, 0, 0, 0, 0,
  239, 265, 266, 267, 268, 0, 0, 0, 0, 0, 0, 0, 1082, 0, 0, 0, 1088, 0, 0, 17231, 16785, 1077, 0, 0, 0, 167936, 167936,
  0, 0, 0, 0, 0, 0, 0, 0, 17231, 17476, 17477, 168337, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 215441, 16785,
  16785, 17488, 16785, 16785, 16785, 0, 0, 0, 0, 15243, 17231, 16826, 16826, 16826, 16826, 16826, 17298, 16826, 16785,
  16785, 17493, 16785, 17495, 16785, 17496, 17497, 16785, 16785, 16785, 16785, 350609, 16785, 16785, 16785, 0, 0, 0, 0,
  15243, 17231, 16826, 16826, 16826, 16826, 16826, 17299, 16826, 16785, 16785, 16785, 17508, 16785, 16785, 16785, 16785,
  16785, 16785, 16785, 17515, 301457, 16785, 17517, 16785, 16785, 16785, 16785, 536, 502, 0, 532, 0, 0, 0, 0, 16785,
  16785, 16785, 17033, 16785, 17519, 0, 0, 0, 0, 0, 0, 0, 0, 15243, 17532, 17533, 16826, 168378, 16826, 0, 1618, 0, 0,
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 251, 252, 0, 16826, 16826, 17553, 16826, 16826, 17555, 301498, 16826, 17556, 17557,
  16826, 16826, 16826, 16826, 17562, 16826, 1617, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 399, 0, 350650, 16826,
  16826, 16826, 16826, 17567, 16826, 16826, 16826, 16826, 17572, 0, 0, 0, 0, 0, 0, 63488, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  756, 0, 0, 759, 0, 0, 0, 1217, 0, 1218, 0, 0, 0, 0, 0, 1220, 0, 0, 0, 0, 0, 1222, 0, 0, 1234, 0, 0, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 0, 401408, 0, 0, 391168, 0, 0, 0, 0, 0, 0, 1262, 0, 1264, 0, 0, 1267, 45403, 45403, 45403, 45403,
  45403, 46329, 246107, 45403, 45403, 45403, 45403, 45403, 45403, 45403, 45403, 45403, 45403, 45403, 46333, 45403,
  45403, 45403, 45403, 45403, 45403, 45403, 46328, 45403, 45403, 45403, 45403, 45403, 45403, 45403, 45403, 45403, 45403,
  45403, 45403, 45403, 45403, 0, 206848, 391515, 0, 0, 0, 0, 0, 0, 0, 1283, 0, 0, 0, 0, 0, 1285, 0, 0, 0, 0, 122880, 0,
  122880, 122880, 0, 122880, 0, 0, 122880, 0, 122880, 122880, 1, 8194, 3, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 665, 665,
  665, 665, 665, 16785, 16785, 391569, 16785, 16785, 17696, 16785, 17698, 16785, 16785, 16785, 17702, 16785, 16785,
  16785, 0, 0, 0, 0, 0, 0, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 17558, 17559, 16826,
  16826, 16826, 16826, 16826, 17715, 16826, 16826, 16826, 17718, 16826, 17720, 16826, 16826, 16826, 16826, 16826, 16826,
  16826, 16826, 16826, 16826, 16826, 17091, 16826, 462, 463, 0, 16826, 16826, 391610, 16826, 0, 1359, 0, 0, 0, 0, 0,
  1361, 0, 0, 0, 0, 0, 796, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1499, 1500, 0, 46558, 45403, 0, 1363, 0, 0, 0, 0, 0, 1365,
  0, 0, 0, 0, 286720, 0, 0, 1369, 0, 0, 1283, 0, 1285, 0, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 17809, 16785,
  16785, 0, 0, 0, 0, 0, 0, 0, 0, 15243, 16826, 16826, 17534, 16826, 16826, 0, 0, 0, 16785, 16785, 16785, 18192, 16826,
  16826, 16826, 18194, 0, 16785, 16785, 0, 0, 0, 1141, 0, 0, 0, 1147, 15243, 16826, 16826, 16826, 16826, 16826, 18031,
  16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 17092, 462, 463, 0, 16785, 16785,
  16785, 287121, 16785, 17814, 16785, 16785, 16785, 16785, 352657, 17817, 16785, 16785, 16785, 16785, 0, 0, 0, 0, 533,
  0, 0, 0, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 17677, 16785, 16785, 16785, 16785, 17821, 16785,
  16785, 16785, 16785, 16785, 16785, 16785, 16785, 1322, 0, 1324, 0, 16826, 16826, 16826, 0, 0, 0, 0, 0, 0, 1717, 0,
  16785, 16785, 16785, 16785, 16785, 16785, 18156, 16785, 16785, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 18145,
  16826, 18147, 0, 0, 0, 0, 0, 0, 507, 0, 0, 0, 0, 0, 0, 0, 287, 287, 16826, 17846, 16826, 16826, 16826, 16826, 16826,
  16826, 352698, 16826, 16826, 17852, 16826, 16826, 1359, 0, 0, 0, 0, 124928, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1361, 0, 1363, 0, 1365, 0, 0, 1470, 0, 0, 0, 0, 0, 0, 0, 0, 480, 0, 0, 0, 0, 254, 255, 0, 45403, 45403, 45403, 45403,
  46563, 45403, 0, 0, 1511, 16785, 16785, 16785, 16785, 194961, 16785, 16785, 0, 1138, 0, 0, 0, 1144, 0, 0, 15243,
  16826, 16826, 16826, 16826, 16826, 16826, 17849, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 1359, 0, 16785,
  16785, 16785, 17904, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 17262,
  16785, 16785, 16826, 16826, 16826, 17929, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 0, 1555,
  329728, 1564, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 45403, 172379, 45403, 0, 1280, 0, 0, 0, 0, 0, 0, 1084, 0, 0, 0, 0,
  0, 1090, 45403, 264539, 45403, 46634, 172032, 264192, 0, 16785, 16785, 172433, 16785, 16785, 16785, 16785, 264593,
  16785, 16785, 16785, 16785, 561, 0, 268288, 0, 0, 0, 0, 0, 16994, 16785, 16785, 16785, 0, 0, 16785, 16785, 16785,
  16785, 16785, 16785, 16785, 16785, 17277, 16785, 16785, 16785, 16785, 17973, 17974, 383377, 16785, 16785, 17977,
  16785, 16785, 16785, 17981, 16785, 16826, 16826, 16826, 0, 0, 0, 0, 1715, 0, 0, 0, 16785, 16785, 16785, 16785, 16785,
  16785, 16785, 16785, 16785, 16785, 16785, 16785, 17679, 172474, 16826, 16826, 16826, 17990, 16826, 16826, 264634,
  16826, 16826, 16826, 16826, 17996, 17998, 16826, 18000, 383418, 0, 0, 0, 0, 0, 1621, 0, 288768, 0, 0, 0, 0, 0, 0, 0,
  1496, 0, 0, 0, 0, 0, 0, 45403, 45403, 45403, 45866, 45403, 45403, 45403, 45403, 45403, 45403, 0, 321536, 0, 0, 0,
  45403, 45403, 45403, 45403, 45403, 0, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 344465, 16826, 16826,
  16826, 16826, 16826, 16826, 16826, 17085, 16826, 16826, 16826, 16826, 16826, 462, 463, 0, 16785, 16785, 289169, 16785,
  16785, 16785, 160145, 16785, 16785, 290406, 16785, 16785, 16785, 16785, 16826, 16826, 17920, 16826, 16826, 16826,
  16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 17937, 0, 0, 0, 160186, 16826, 16826, 16826, 16826,
  16826, 16826, 16826, 290417, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 17736, 16826, 16826,
  16826, 16826, 16826, 16826, 16785, 16785, 16785, 16785, 18081, 16785, 16785, 16785, 16785, 16826, 16826, 16826, 18089,
  16826, 16826, 16826, 0, 0, 0, 0, 16785, 16785, 16785, 16785, 16785, 16785, 16826, 16826, 16826, 16826, 16826, 16826,
  195002, 16826, 16826, 16826, 16826, 16826, 16785, 16785, 16785, 16785, 18112, 16826, 16826, 16826, 16826, 16826,
  16826, 16826, 16826, 16826, 18122, 0, 0, 0, 0, 125295, 0, 125295, 125295, 0, 125295, 0, 0, 125295, 0, 125295, 125295,
  1, 8194, 0, 4, 0, 0, 0, 0, 0, 0, 133120, 0, 0, 0, 0, 0, 1560, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 271, 272, 273, 274, 0,
  16826, 16826, 211386, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 163840, 1764, 0, 0, 0, 0, 0, 956, 960, 0, 0, 0,
  964, 968, 0, 0, 0, 0, 0, 535, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17710, 16826, 16826, 16826, 16826, 0, 18152, 16785,
  16785, 16785, 219537, 291217, 16785, 16785, 16785, 18158, 16826, 219578, 16826, 291258, 16826, 16826, 16826, 16826,
  17554, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 17560, 16826, 16826, 16826, 16826, 17541, 16826, 16826, 16826,
  16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 0, 1192, 0, 0, 0, 16826, 342458, 0, 0, 0, 16785, 16785, 16785,
  16785, 16826, 16826, 16826, 16826, 0, 16785, 16785, 18154, 18155, 16785, 16785, 16785, 16785, 16785, 16826, 16826,
  16826, 18160, 16826, 18161, 0, 0, 47337, 0, 0, 0, 0, 0, 292, 0, 0, 0, 0, 0, 0, 0, 1568, 0, 0, 0, 0, 1573, 45403,
  45403, 45403, 292, 292, 36864, 38912, 0, 0, 0, 248, 34816, 248, 248, 248, 248, 0, 248, 248, 248, 248, 248, 248, 45408,
  248, 248, 16817, 16831, 16817, 16817, 16831, 16817, 16817, 16817, 16817, 16817, 16817, 16831, 16831, 16831, 16831,
  16831, 16831, 16831, 16831, 16831, 16817, 248, 248, 248, 45408, 0, 45408, 0, 0, 45408, 248, 45408, 45408, 248, 45408,
  292, 248, 248, 292, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 16790, 248, 16817, 16831, 1, 8194, 3, 4,
  41191, 41191, 47337, 0, 0, 0, 0, 0, 0, 0, 81920, 81920, 81920, 81920, 81920, 81920, 81920, 81920, 81920, 0, 0, 0, 0,
  0, 0, 0, 16785, 254353, 16785, 16785, 16785, 16785, 439, 440, 0, 16826, 16826, 16826, 16826, 16826, 16826, 16826,
  16826, 16826, 17934, 16826, 16826, 16826, 0, 0, 0, 254394, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826,
  16826, 16826, 16826, 16826, 462, 463, 0, 0, 0, 0, 139264, 0, 139264, 139264, 0, 0, 0, 0, 0, 0, 139264, 0, 0, 0, 0, 0,
  0, 0, 139264, 139264, 139264, 139264, 0, 139264, 0, 0, 287, 287, 0, 0, 0, 0, 0, 0, 750, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 744, 0, 0, 0, 0, 0, 750, 0, 0, 45403, 45403, 45403, 45403, 45868, 45403, 45403, 45403, 45403, 45403, 45403,
  1509, 0, 0, 16785, 16785, 17898, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 17239, 16785, 16785,
  16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 17910, 16785, 16785, 16785, 16785, 16785, 201146, 16826,
  16785, 16826, 16785, 16826, 16785, 16826, 16785, 16826, 0, 0, 0, 0, 0, 0, 0, 0, 337920, 0, 0, 0, 1624, 0, 0, 0, 0,
  36864, 38912, 0, 0, 0, 325, 34816, 325, 325, 325, 325, 333, 325, 325, 325, 45409, 372, 45409, 372, 372, 45409, 384,
  45409, 45409, 384, 45409, 372, 384, 384, 384, 372, 384, 384, 384, 384, 384, 384, 384, 384, 384, 384, 384, 16791, 384,
  384, 384, 384, 384, 384, 45409, 384, 384, 16791, 16832, 16791, 16791, 16832, 16791, 16791, 16791, 16791, 16791, 16791,
  16832, 16832, 16832, 16832, 16832, 16832, 16832, 16832, 16832, 16791, 16791, 16832, 1, 8194, 3, 4, 41191, 41191,
  47337, 0, 0, 0, 0, 0, 0, 0, 86016, 86016, 86016, 86016, 86016, 86016, 86016, 86016, 86016, 0, 0, 0, 0, 0, 0, 0, 0,
  145408, 0, 0, 0, 1567, 0, 0, 0, 0, 1571, 0, 0, 45403, 45403, 45403, 45403, 45403, 45403, 45403, 45642, 45403, 45403,
  45403, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 302, 0, 0, 0, 155648, 0, 155995, 45403, 45403, 45403, 45403, 0,
  16785, 156049, 16785, 16785, 16785, 0, 0, 0, 0, 15243, 17231, 16826, 16826, 16826, 17295, 16826, 16826, 17302, 235106,
  16785, 16785, 327267, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16826, 156090, 203153,
  16785, 16785, 16785, 16785, 16785, 18055, 16785, 16785, 16785, 16826, 16826, 203194, 16826, 16826, 16826, 0, 0, 0, 0,
  18167, 16785, 16785, 16785, 16785, 16785, 18173, 16826, 16826, 16826, 16826, 18065, 16826, 16826, 16826, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 16785, 16785, 16785, 16785, 211345, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16996, 16785,
  16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 17503, 16785, 16785, 16785,
  17026, 16785, 0, 0, 0, 0, 0, 0, 0, 0, 16785, 16996, 16785, 16785, 1136, 0, 0, 0, 1142, 0, 0, 0, 15243, 16826, 16826,
  16826, 16826, 16826, 16826, 17325, 17326, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826,
  354746, 16826, 369082, 16826, 16826, 723, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1023, 276, 0, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 0, 287, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 275, 250, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 1215, 0, 0, 36864, 38912, 0, 0, 0, 0, 34816, 0, 0, 0, 0, 334, 0, 0, 0, 0, 247, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 0, 45410, 373, 45410, 373, 373, 45410, 385, 45410, 45410, 385, 45410, 373, 385, 391, 391, 373, 396,
  373, 373, 373, 373, 373, 373, 373, 373, 373, 373, 16792, 373, 423, 373, 373, 373, 423, 45410, 373, 373, 16818, 16833,
  16818, 16818, 16833, 16818, 16818, 16818, 16818, 16818, 16818, 16833, 16833, 16833, 16833, 16833, 16833, 16833, 16833,
  16833, 16818, 16818, 16833, 1, 8194, 3, 4, 41191, 41191, 47337, 0, 0, 0, 0, 0, 0, 0, 94573, 94573, 94573, 94573,
  94573, 94573, 94573, 94573, 94573, 0, 592, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 289, 0, 16785, 16785, 16785,
  16999, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 17501, 16785, 16785,
  0, 0, 0, 777, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 802, 0, 0, 45403, 45403, 45874, 45403, 45403, 45403, 45403,
  45403, 45403, 45403, 45403, 45403, 45883, 45403, 0, 0, 0, 0, 254, 0, 0, 0, 257, 0, 0, 0, 0, 0, 0, 0, 0, 364544,
  389120, 0, 0, 0, 0, 0, 0, 0, 831, 0, 0, 0, 835, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17231, 16785, 16785, 16785, 17235, 16785,
  16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 17248, 17280, 16785, 16785, 0, 0, 0, 0, 15243,
  17231, 16826, 16826, 16826, 16826, 17296, 16826, 16826, 0, 0, 0, 16785, 235921, 328081, 16785, 16826, 235962, 328122,
  16826, 0, 16785, 16785, 0, 1139, 0, 0, 0, 1145, 0, 0, 15243, 16826, 16826, 16826, 16826, 16826, 17542, 16826, 16826,
  16826, 16826, 16826, 16826, 16826, 17549, 16826, 16826, 17335, 16826, 16826, 16826, 0, 0, 0, 0, 0, 0, 0, 0, 0, 47822,
  0, 0, 0, 0, 278, 280, 304, 0, 0, 0, 0, 0, 0, 0, 0, 0, 308, 0, 0, 0, 0, 308, 0, 0, 0, 0, 976, 0, 0, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 1010, 0, 0, 0, 0, 0, 1014, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1021, 0, 0, 0, 0, 364, 0, 364, 364, 0, 364, 0, 0,
  364, 0, 364, 364, 1, 8194, 3, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1486, 0, 0, 0, 16785, 17506, 16785, 16785, 16785,
  16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 17264, 16785, 16785, 16785, 16785,
  17695, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 0, 0, 0, 0, 17829, 16826, 16826, 0, 1391,
  0, 0, 1394, 0, 0, 0, 0, 0, 1398, 1399, 0, 0, 1402, 0, 0, 0, 0, 204800, 0, 0, 0, 0, 0, 0, 0, 0, 0, 45403, 45403, 46113,
  45403, 45403, 45403, 45403, 45403, 45403, 16785, 16785, 16785, 17824, 16785, 16785, 16785, 16785, 16785, 0, 0, 0, 0,
  16826, 16826, 16826, 0, 0, 0, 16785, 16785, 16785, 16785, 16785, 16785, 16826, 16826, 16826, 16826, 16826, 16826,
  16826, 16826, 16826, 16826, 1739, 46560, 45403, 45403, 45403, 45403, 46564, 0, 0, 0, 16785, 17897, 16785, 17899,
  16785, 16785, 16785, 0, 0, 0, 0, 15243, 17231, 16826, 16826, 17294, 16826, 16826, 16826, 16826, 17322, 16826, 16826,
  16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 17561, 16826, 16826, 16785, 17902, 16785,
  16785, 16785, 16785, 17906, 17907, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 17828, 0, 0, 0, 0, 16826,
  16826, 16826, 16785, 16785, 16785, 17917, 16826, 17919, 16826, 16826, 17922, 16826, 16826, 16826, 16826, 16826, 16826,
  16826, 16826, 17310, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 17327, 16826, 16826, 16826, 16826, 16826,
  16826, 16826, 16826, 17088, 16826, 16826, 16826, 16826, 462, 463, 0, 17926, 16826, 16826, 16826, 16826, 16826, 17931,
  16826, 17933, 16826, 17935, 16826, 16826, 0, 0, 0, 16785, 16785, 16785, 16785, 16826, 16826, 16826, 16826, 0, 16785,
  16785, 161792, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1245, 46632, 45403, 45403, 45403, 0, 0, 0, 16785, 16785,
  16785, 16785, 17968, 16785, 16785, 16785, 16785, 0, 0, 0, 0, 597, 0, 0, 597, 16785, 16785, 16785, 16785, 0, 0, 0, 0,
  366592, 0, 0, 366592, 16785, 17031, 17032, 16785, 16826, 16826, 17988, 16826, 16826, 16826, 16826, 16826, 16826,
  16826, 16826, 17995, 16826, 16826, 16826, 16826, 1189, 1359, 0, 0, 0, 0, 1195, 1361, 0, 0, 0, 0, 0, 727, 731, 0, 0,
  735, 739, 0, 0, 0, 0, 0, 0, 18130, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 17514, 16785, 16785,
  16785, 17516, 16785, 16785, 0, 0, 1628, 0, 0, 45403, 45403, 45403, 45403, 45403, 0, 16785, 16785, 16785, 16785, 16785,
  16785, 16785, 18157, 16785, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 17850, 16826, 16826, 16826, 16826, 17853,
  16826, 1359, 0, 0, 0, 0, 1657, 0, 0, 0, 0, 0, 0, 0, 0, 0, 45403, 16785, 16785, 1137, 0, 0, 0, 1143, 0, 0, 0, 15243,
  16826, 16826, 16826, 16826, 16826, 18143, 16826, 16826, 16826, 16826, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  309, 16785, 16785, 18110, 18111, 16785, 16826, 16826, 16826, 16826, 18117, 16826, 18119, 18120, 18121, 16826, 0, 0, 0,
  0, 1620, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 309, 0, 0, 0, 0, 0, 18176, 16826, 16826, 0, 0, 0, 16785, 16785, 16785, 16785,
  16785, 16785, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 17725,
  16826, 0, 0, 36864, 38912, 0, 0, 0, 249, 34816, 249, 249, 249, 249, 0, 249, 249, 249, 45411, 374, 45411, 374, 374,
  45411, 386, 45411, 45411, 386, 45411, 374, 386, 386, 386, 374, 386, 386, 386, 386, 386, 386, 386, 386, 386, 386, 386,
  16793, 386, 386, 386, 386, 386, 386, 45411, 386, 426, 16793, 16834, 16793, 16793, 16834, 16793, 16793, 16793, 16793,
  16793, 16793, 16834, 16834, 16834, 16834, 16834, 16834, 16834, 16834, 16834, 16793, 16793, 16834, 1, 8194, 3, 4,
  41191, 41191, 47337, 0, 0, 0, 0, 0, 0, 0, 114688, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1562, 0, 0, 0, 1563, 0, 385024, 257, 258,
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 501, 502, 0, 0, 532, 0, 0, 0, 536, 0, 536, 0, 0, 0, 0, 543, 0, 0, 0, 0, 462, 0, 0,
  0, 0, 465, 0, 0, 0, 0, 0, 0, 264, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 57344, 0, 0, 0, 0, 0, 16785, 16785, 16785, 16785,
  17001, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 237969, 16785,
  16785, 16785, 16785, 16785, 16785, 17236, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 17246, 16785, 16785,
  16785, 0, 0, 16785, 16785, 16785, 16785, 17273, 16785, 16785, 16785, 16785, 16785, 16785, 439, 440, 0, 16826, 16826,
  16826, 16826, 17059, 16826, 16826, 16785, 16785, 16785, 16785, 16785, 17254, 16785, 16785, 16785, 16785, 16785, 17260,
  16785, 16785, 16785, 16785, 0, 0, 594, 0, 0, 0, 0, 0, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785,
  17678, 16785, 16785, 16785, 17266, 16785, 16785, 0, 0, 16785, 17236, 16785, 16785, 16785, 16785, 16785, 16785, 16785,
  16785, 16785, 17243, 16785, 16785, 16785, 16785, 16785, 16785, 16826, 16826, 17320, 16826, 16826, 16826, 16826, 16826,
  16826, 17328, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 17932, 16826, 16826, 16826, 16826, 16826, 0, 0, 0,
  1360, 0, 958, 0, 0, 0, 1362, 0, 962, 16826, 17337, 16826, 16826, 0, 958, 962, 0, 0, 0, 966, 970, 0, 47822, 0, 0, 0, 0,
  462, 0, 0, 0, 462, 0, 463, 0, 0, 0, 463, 0, 465, 0, 466, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 300, 0, 0, 0, 16785,
  16785, 17479, 17480, 16785, 17482, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 17489, 16785, 16785, 16785, 0, 0,
  16785, 16785, 16785, 17242, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 17484, 16785, 16785, 16785, 16785, 16785,
  16785, 16785, 16785, 17485, 16785, 16785, 16785, 16785, 16785, 17490, 16785, 17537, 16826, 16826, 17540, 16826, 16826,
  16826, 16826, 16826, 16826, 16826, 16826, 17548, 16826, 16826, 16826, 0, 0, 0, 16785, 16785, 16785, 16785, 18185,
  16785, 16826, 16826, 16826, 16826, 16826, 377274, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16785, 16785, 18132, 18133, 16785, 16785,
  16785, 16785, 18137, 16785, 1256, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 45403, 45403, 45403, 45628, 45403, 45403,
  16785, 16785, 16785, 16785, 16785, 17684, 16785, 16785, 16785, 16785, 16785, 16785, 17691, 16785, 16785, 16785, 0, 0,
  0, 0, 15243, 17231, 17292, 17293, 16826, 16826, 16826, 16826, 17300, 16826, 17728, 16826, 16826, 16826, 16826, 16826,
  16826, 16826, 16826, 17737, 16826, 16826, 16826, 16826, 16826, 16826, 17719, 16826, 16826, 16826, 16826, 16826, 16826,
  16826, 16826, 16826, 16826, 16826, 16826, 17738, 16826, 16826, 16826, 1378, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  0, 4096, 0, 1478, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1488, 0, 241, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  399, 400, 0, 241, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 287, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 526, 0, 0, 529, 0, 0,
  36864, 38912, 0, 0, 0, 0, 34816, 0, 0, 0, 0, 335, 0, 0, 0, 0, 507, 0, 0, 0, 0, 507, 0, 0, 0, 0, 399, 400, 0, 0, 0,
  45412, 375, 45412, 375, 382, 45412, 0, 45412, 45412, 0, 45412, 375, 0, 0, 0, 0, 268288, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  0, 0, 1386, 0, 0, 0, 375, 375, 375, 375, 375, 375, 375, 375, 375, 375, 375, 375, 375, 375, 16794, 375, 375, 375, 375,
  375, 375, 45412, 375, 375, 16794, 16835, 16794, 16794, 16835, 16794, 16794, 16794, 16794, 16794, 16794, 16835, 16835,
  16835, 16835, 16835, 16835, 16835, 16835, 16835, 16794, 16794, 16835, 1, 8194, 3, 4, 41191, 41430, 47337, 0, 0, 0, 0,
  0, 0, 0, 120832, 0, 0, 0, 0, 0, 0, 0, 0, 0, 282624, 0, 0, 0, 45403, 16785, 16785, 503, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 287, 287, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 773, 16785, 16785, 16785, 16785, 17002, 16785, 16785, 17009,
  16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 17908, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785,
  17009, 16785, 16785, 16785, 16785, 439, 440, 0, 16826, 16826, 16826, 16826, 17060, 16826, 16826, 0, 0, 0, 18191,
  16785, 16785, 16785, 18193, 16826, 16826, 16826, 0, 16785, 16785, 16785, 0, 0, 16785, 17270, 16785, 16785, 16785,
  16785, 16785, 17276, 16785, 16785, 16785, 0, 0, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785,
  16785, 16785, 16785, 17704, 16785, 0, 17068, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826,
  16826, 16826, 462, 463, 0, 0, 0, 0, 294912, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1400, 0, 0, 0, 16785, 16785, 16785,
  16785, 17253, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 17261, 16785, 16785, 16785, 0, 0, 0, 0, 15243, 17231,
  151994, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 17081, 16826, 16826, 16826, 16826, 16826, 462, 463, 0, 17318,
  16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 17329, 16826, 16826, 16826, 16826, 16826, 16826, 17838,
  16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 287162, 0, 0, 0, 999, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1011, 0,
  0, 0, 0, 309248, 0, 0, 0, 0, 309757, 0, 0, 0, 0, 399, 400, 0, 270336, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 399,
  607, 16785, 16785, 16785, 16785, 16785, 17510, 16785, 17512, 16785, 16785, 270737, 16785, 16785, 16785, 16785, 16785,
  16785, 439, 440, 0, 16826, 16826, 16826, 17057, 16826, 16826, 16826, 16826, 17538, 16826, 16826, 16826, 16826, 16826,
  17544, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 17842, 16826, 16826, 16826, 16826,
  16826, 16826, 16826, 270778, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826,
  16826, 16826, 371130, 16826, 1197, 0, 0, 0, 1203, 0, 0, 0, 1209, 0, 0, 0, 0, 0, 0, 0, 137216, 0, 0, 0, 0, 0, 0, 0, 0,
  282, 0, 0, 0, 0, 282, 0, 0, 1232, 0, 0, 0, 0, 0, 0, 0, 0, 1239, 0, 0, 0, 0, 0, 0, 440, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1019, 0, 0, 0, 0, 0, 0, 0, 0, 1258, 0, 0, 0, 0, 0, 1263, 0, 0, 0, 0, 45403, 45403, 46465, 45403, 45403, 229723, 45403,
  45403, 45403, 45403, 45403, 0, 229376, 16826, 16826, 18095, 0, 0, 0, 1714, 0, 0, 0, 0, 16785, 16785, 16785, 16785,
  16785, 16785, 16785, 16785, 16785, 16785, 217489, 227729, 16785, 251, 0, 303, 252, 0, 0, 0, 0, 0, 0, 0, 277, 0, 0, 0,
  0, 0, 0, 0, 0, 0, 0, 0, 287, 277, 0, 0, 36864, 38912, 303, 0, 277, 0, 34816, 0, 0, 0, 0, 0, 0, 0, 223232, 0, 0, 0,
  757, 758, 0, 0, 0, 0, 0, 0, 45413, 376, 45413, 381, 381, 45413, 381, 45413, 45413, 381, 45413, 381, 381, 376, 381,
  381, 381, 381, 381, 381, 381, 381, 381, 381, 381, 16795, 381, 381, 381, 381, 381, 381, 381, 45413, 381, 381, 16819,
  16836, 16819, 16819, 16836, 16819, 16819, 16819, 16819, 16819, 16819, 16836, 16836, 16836, 16836, 16836, 16836, 16836,
  16836, 16836, 16819, 16819, 16836, 1, 8194, 3, 4, 41191, 41191, 47337, 0, 0, 0, 0, 0, 0, 0, 315392, 0, 0, 0, 221184,
  0, 0, 372736, 0, 0, 504, 258048, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 287, 287, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 772, 0, 530,
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17231, 16785, 45403, 45636, 45403, 45403, 45403, 45639, 45403, 45403,
  45403, 45645, 45403, 0, 0, 0, 0, 566, 16785, 16993, 16785, 16785, 17003, 16785, 16785, 17010, 16785, 16785, 16785,
  17014, 16785, 16785, 16785, 16785, 0, 503, 0, 0, 0, 0, 0, 0, 16785, 16785, 16785, 17034, 17024, 16785, 16785, 16785,
  566, 504, 258643, 0, 0, 0, 0, 0, 16993, 16785, 16785, 17003, 16785, 17010, 16785, 16785, 16785, 16785, 439, 440, 0,
  16826, 17050, 16826, 16826, 17061, 16826, 16826, 0, 1806, 0, 16785, 16785, 16785, 16785, 16826, 16826, 16826, 16826,
  0, 16785, 16785, 16785, 0, 783, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 17244,
  16785, 16785, 16785, 16785, 17069, 16826, 16826, 16826, 17075, 16826, 16826, 16826, 16826, 17089, 16826, 16826, 16826,
  462, 463, 0, 0, 0, 0, 358400, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 245760, 747, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  59392, 0, 763, 287, 287, 0, 0, 765, 0, 0, 0, 0, 0, 0, 0, 0, 0, 246, 0, 0, 0, 0, 0, 246, 746, 0, 0, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 801, 0, 0, 0, 0, 0, 20771, 20771, 20771, 20771, 20771, 20771, 20771, 20771, 20771, 20771, 0, 16785, 16785,
  16785, 16785, 17481, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785,
  354705, 369041, 16785, 16826, 16826, 17539, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826,
  16826, 16826, 16826, 462, 463, 0, 0, 0, 0, 16785, 17672, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785,
  16785, 16785, 16785, 16785, 16785, 395665, 16785, 16785, 0, 1379, 0, 307200, 0, 335872, 0, 0, 0, 0, 1384, 0, 0, 0, 0,
  0, 0, 260096, 0, 0, 0, 0, 0, 0, 45403, 45403, 45403, 45403, 45403, 45403, 45403, 45871, 45403, 45403, 1390, 0, 0, 0,
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1403, 0, 0, 1406, 45403, 45403, 45403, 45403, 46467, 45403, 46468, 45403, 336219,
  45403, 45403, 0, 0, 0, 0, 547, 0, 0, 0, 0, 508, 0, 0, 555, 0, 0, 0, 0, 0, 45403, 45403, 45403, 45403, 45403, 0, 18015,
  16785, 16785, 16785, 16785, 0, 0, 0, 0, 0, 0, 0, 0, 16785, 16785, 16785, 17004, 1416, 0, 0, 0, 0, 0, 16785, 16785,
  16785, 16785, 16785, 16785, 17808, 16785, 16785, 16785, 0, 0, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785,
  16785, 16785, 17279, 16785, 17811, 16785, 16785, 16785, 16785, 16785, 16785, 336273, 16785, 16785, 16785, 16785,
  16785, 16785, 17820, 16785, 17822, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 0, 0, 0, 0, 16826, 16826, 16826,
  0, 0, 0, 16785, 16785, 18183, 18184, 16785, 16785, 16826, 16826, 18187, 18188, 16826, 16826, 17834, 16826, 16826,
  17837, 16826, 17839, 16826, 16826, 16826, 16826, 16826, 17843, 16826, 16826, 16785, 16826, 16785, 16826, 16785, 16826,
  16785, 16826, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1626, 0, 1490, 0, 0, 0, 1494, 0, 0, 1497, 0, 0, 0, 0, 0,
  45403, 45403, 45403, 45403, 45403, 0, 16785, 16785, 16785, 16785, 16785, 17901, 16785, 16785, 16785, 16785, 16785,
  16785, 16785, 16785, 16785, 16785, 16785, 17911, 16785, 16785, 16785, 0, 0, 16785, 16785, 16785, 16785, 16785, 16785,
  16785, 16785, 16785, 17278, 16785, 16785, 17972, 16785, 16785, 16785, 16785, 16785, 16785, 240017, 16785, 16785,
  16785, 16785, 16826, 17984, 16826, 16826, 16826, 16826, 17566, 16826, 16826, 16826, 16826, 16826, 16826, 0, 0, 0, 0,
  0, 1688, 0, 0, 0, 16785, 16826, 178618, 18028, 18029, 16826, 16826, 16826, 16826, 16826, 16826, 18035, 16826, 16826,
  16826, 16826, 16826, 17323, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 17333, 16826, 16785, 16785, 16785,
  18052, 16785, 16785, 16785, 16785, 16785, 16785, 16826, 16826, 16826, 18060, 16826, 16826, 16785, 16826, 16785, 16826,
  16785, 16826, 334225, 334266, 0, 0, 0, 0, 0, 0, 549, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83968, 0, 83968, 83968, 0, 0,
  16785, 16785, 16785, 16785, 16785, 18082, 16785, 16785, 16785, 16826, 16826, 16826, 16826, 16826, 18091, 16826, 16826,
  16826, 16826, 17717, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 18037,
  16826, 16826, 18108, 16785, 16785, 16785, 16785, 16826, 16826, 16826, 18116, 16826, 16826, 16826, 16826, 16826, 16826,
  0, 957, 961, 0, 0, 0, 965, 969, 0, 47822, 0, 0, 0, 0, 1742, 0, 0, 0, 16785, 16785, 16785, 16785, 16785, 16785, 16785,
  18136, 16785, 18138, 279, 280, 36864, 38912, 0, 281, 281, 280, 34816, 280, 280, 330, 280, 0, 280, 280, 330, 345, 345,
  45414, 377, 45414, 377, 377, 45414, 345, 45414, 45414, 345, 45414, 389, 345, 345, 345, 345, 345, 345, 45414, 345, 345,
  16796, 16837, 16796, 16796, 16837, 16796, 16796, 16796, 16796, 16796, 16796, 16837, 16837, 16837, 16837, 16837, 16837,
  16837, 16837, 16837, 16796, 345, 345, 394, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 16796, 345, 16796,
  16837, 1, 8194, 3, 4, 41191, 41191, 47337, 0, 0, 0, 0, 0, 0, 0, 352256, 0, 0, 0, 0, 0, 0, 0, 0, 290, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 0, 0, 0, 253, 0, 476, 0, 0, 0, 0, 0, 0, 479, 0, 0, 482, 483, 0, 254, 255, 0, 0, 0, 0, 399360, 0,
  399360, 0, 0, 0, 0, 0, 0, 399360, 399360, 0, 0, 0, 0, 399360, 0, 399360, 399360, 0, 0, 257, 258, 0, 0, 0, 0, 494, 0,
  495, 496, 497, 498, 0, 0, 0, 0, 0, 1224, 0, 0, 0, 0, 0, 0, 0, 0, 1230, 0, 0, 494, 545, 546, 0, 0, 0, 0, 551, 0, 0, 0,
  0, 0, 0, 0, 393216, 0, 0, 0, 0, 0, 0, 0, 0, 1396, 0, 0, 0, 0, 0, 0, 0, 45403, 45403, 45403, 45638, 45403, 45403,
  45403, 45403, 366939, 45403, 45403, 0, 0, 0, 0, 0, 0, 1080, 1283, 0, 0, 0, 0, 1086, 1285, 0, 0, 0, 366592, 497, 0, 0,
  0, 600, 0, 0, 0, 0, 551, 551, 399, 400, 16785, 16785, 16997, 17000, 16785, 17006, 16785, 16785, 16785, 17012, 16785,
  16785, 16785, 16785, 17021, 366993, 17006, 16785, 17038, 16785, 17021, 366993, 439, 440, 0, 16826, 16826, 17055,
  17058, 16826, 17064, 16826, 16826, 16826, 16826, 17731, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826,
  16826, 379322, 16826, 16826, 17072, 17074, 16826, 16826, 16826, 17083, 367034, 16826, 16826, 16826, 16826, 462, 463,
  0, 0, 0, 0, 399360, 0, 399360, 0, 0, 399360, 0, 0, 0, 399360, 0, 0, 399360, 0, 399360, 0, 0, 0, 0, 0, 0, 0, 775, 0, 0,
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 400, 0, 0, 0, 792, 0, 0, 0, 0, 0, 0, 0, 799, 0, 0, 0, 0, 0, 0, 262144, 0, 0, 0, 0,
  0, 0, 0, 184320, 0, 45403, 45873, 45403, 45403, 45403, 45403, 45403, 45403, 45403, 45403, 45403, 45403, 45403, 45403,
  0, 0, 0, 16785, 16785, 16785, 17966, 16785, 16785, 16785, 16785, 16785, 17336, 16826, 16826, 16826, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 47822, 0, 0, 0, 0, 594, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 842, 846, 0, 17231, 0, 0, 0, 1038, 0, 543, 0, 0,
  0, 0, 0, 0, 0, 0, 0, 0, 0, 174080, 0, 0, 0, 0, 0, 0, 0, 1052, 0, 0, 0, 45403, 45403, 45403, 45403, 45403, 45403,
  45403, 45403, 45403, 46470, 45403, 0, 0, 0, 0, 1079, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17231, 16785, 16785, 16785,
  16785, 16785, 16785, 17511, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 17816, 16785, 16785, 16785,
  16785, 16785, 16785, 17491, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785,
  16785, 17504, 17551, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826,
  16826, 252346, 0, 1223, 0, 737, 0, 0, 0, 1225, 0, 741, 0, 0, 0, 0, 0, 0, 565, 0, 0, 0, 45403, 45403, 45403, 45403,
  45403, 45403, 45403, 46469, 45403, 45403, 45403, 0, 0, 1286, 0, 845, 16785, 16785, 16785, 16785, 16785, 16785, 16785,
  16785, 16785, 16785, 16785, 16785, 16785, 16785, 17819, 16785, 17680, 16785, 16785, 16785, 16785, 16785, 16785, 16785,
  16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 1136, 0, 0, 1323, 0, 901, 0, 0, 0, 1325, 0, 905, 16826, 16826,
  16826, 16826, 16826, 17324, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826,
  395706, 0, 0, 0, 0, 0, 1364, 0, 966, 0, 0, 0, 1366, 0, 970, 0, 0, 0, 0, 0, 1224, 0, 0, 0, 0, 0, 0, 1228, 0, 0, 0,
  16785, 16785, 16785, 16785, 17918, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 1190,
  0, 0, 0, 1196, 16826, 17927, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 0, 0, 0, 0,
  0, 0, 0, 0, 1557, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 405504, 0, 0, 405504, 16826, 17986, 16826, 16826, 16826,
  16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 0, 0, 0, 16785, 16785, 16785, 18080,
  16785, 16785, 16785, 16785, 16785, 16826, 16826, 18088, 16826, 16826, 16826, 16826, 16826, 313786, 16826, 16826,
  16826, 16826, 16826, 16826, 16826, 0, 0, 0, 0, 795, 0, 0, 0, 0, 47822, 0, 0, 16785, 18109, 16785, 16785, 16785, 16826,
  18114, 16826, 16826, 16826, 18118, 16826, 16826, 16826, 16826, 0, 958, 962, 0, 0, 0, 966, 970, 0, 47822, 0, 0, 0, 0,
  36864, 38912, 312, 0, 0, 0, 34816, 0, 0, 0, 0, 336, 0, 0, 0, 0, 595, 0, 0, 0, 0, 0, 598, 522, 0, 0, 504, 0, 16820,
  16820, 16820, 16820, 16820, 16820, 16838, 16838, 16838, 16838, 16838, 16838, 16838, 16838, 16838, 16820, 16838, 1,
  8194, 3, 4, 41191, 41191, 47337, 0, 0, 0, 0, 0, 0, 0, 596, 0, 0, 366592, 0, 0, 0, 599, 0, 0, 0, 748, 0, 0, 0, 0, 753,
  0, 0, 0, 0, 0, 0, 0, 0, 0, 308, 0, 0, 0, 316, 0, 0, 748, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 65536, 0, 17249,
  16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 0,
  16785, 16785, 17282, 0, 0, 0, 0, 15243, 17231, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 17570, 16826,
  16826, 0, 0, 0, 0, 0, 16826, 16826, 16826, 17306, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 17313, 16826,
  16826, 16826, 16826, 16826, 336314, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 0, 0, 1685, 0, 0, 0, 0, 0,
  0, 16785, 0, 0, 0, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1035, 0, 0, 0, 0, 789, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 0, 578051, 578051, 1198, 0, 0, 0, 1204, 0, 0, 0, 1210, 0, 0, 0, 0, 0, 0, 0, 660, 440, 0, 0, 0, 0, 0, 0, 0, 0,
  0, 1042, 0, 0, 0, 0, 0, 0, 995, 0, 0, 0, 0, 0, 1001, 0, 0, 0, 0, 0, 0, 0, 0, 0, 399, 439, 399, 399, 439, 399, 399,
  16785, 246161, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785,
  16785, 17265, 0, 1140, 0, 0, 0, 0, 0, 1146, 0, 0, 0, 16826, 16826, 16826, 16826, 16826, 17732, 17733, 16826, 16826,
  16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 17331, 16826, 16826, 16826, 0, 0, 1205, 0, 0, 0,
  0, 0, 1211, 0, 0, 0, 0, 0, 0, 0, 661, 662, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1383, 0, 0, 0, 0, 0, 0, 0, 0, 1380, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 578052, 73728, 16785, 16785, 16785, 16785, 17813, 16785, 16785, 16785, 16785, 16785,
  16785, 16785, 16785, 16785, 16785, 16785, 16785, 17818, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 17825, 16785,
  16785, 16785, 16785, 0, 0, 0, 0, 16826, 16826, 16826, 0, 0, 0, 16785, 18182, 16785, 16785, 16785, 342417, 16826,
  18186, 16826, 16826, 17845, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826,
  0, 0, 0, 1194, 0, 0, 0, 225280, 0, 0, 0, 0, 0, 0, 0, 0, 225280, 0, 0, 225280, 0, 0, 0, 0, 403456, 0, 403456, 403456,
  0, 0, 0, 0, 0, 0, 403456, 0, 0, 0, 243, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1375, 0, 0, 16785, 16785, 16785, 16785,
  225681, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 18025, 16785, 16826,
  16826, 16785, 16785, 16785, 17027, 0, 225280, 0, 0, 0, 0, 0, 0, 16785, 16785, 16785, 225681, 0, 0, 47337, 0, 0, 0,
  282, 0, 0, 0, 0, 0, 0, 0, 0, 0, 400, 440, 400, 400, 440, 400, 400, 0, 0, 36864, 38912, 0, 0, 0, 282, 34816, 282, 282,
  282, 282, 0, 282, 282, 282, 282, 282, 282, 282, 282, 282, 282, 282, 16798, 282, 282, 282, 282, 45415, 0, 45415, 0, 0,
  45415, 282, 45415, 45415, 282, 45415, 0, 282, 282, 282, 282, 282, 282, 45415, 282, 282, 16798, 16839, 16798, 16798,
  16839, 16798, 16798, 16798, 16798, 16798, 16798, 16839, 16839, 16839, 16839, 16839, 16839, 16839, 16839, 16839, 16798,
  16798, 16839, 1, 8194, 3, 4, 41191, 41191, 47337, 0, 0, 0, 0, 0, 0, 0, 745, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 225280, 0,
  0, 0, 399, 400, 0, 0, 478, 0, 0, 0, 0, 0, 0, 0, 0, 0, 484, 254, 255, 0, 0, 0, 253, 0, 0, 0, 253, 0, 0, 0, 0, 0, 0, 0,
  0, 1005, 0, 0, 0, 0, 0, 0, 0, 45634, 45403, 45403, 45403, 45403, 309832, 45403, 45403, 45644, 45403, 45403, 0, 0, 0,
  0, 0, 378880, 0, 0, 0, 0, 0, 0, 0, 0, 0, 284, 0, 0, 0, 0, 287, 0, 16785, 16785, 16785, 17039, 16785, 17023, 439, 440,
  0, 16826, 16826, 16826, 16826, 16826, 16826, 17066, 16826, 16826, 16826, 16826, 309940, 17078, 16826, 16826, 17087,
  16826, 16826, 16826, 16826, 462, 463, 0, 0, 0, 275, 0, 0, 0, 0, 0, 0, 0, 275, 0, 0, 0, 0, 0, 978, 0, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 258, 0, 0, 0, 0, 0, 0, 0, 465, 466, 0, 0, 4, 41191, 47822, 0, 0, 0, 0, 0, 0, 0, 237568, 0, 0, 0, 275, 0, 275,
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55296, 0, 118784, 126976, 0, 0, 0, 287, 287, 0, 0, 0, 0, 0, 0, 0, 769, 0, 0, 0, 0, 0,
  1224, 0, 0, 0, 0, 0, 1227, 0, 0, 0, 0, 0, 752, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 257, 0, 0, 0, 0, 0, 0, 0, 0, 0, 776, 0,
  0, 779, 0, 0, 0, 0, 783, 0, 0, 0, 0, 0, 234, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 43008, 0, 0, 0, 237915, 45403, 45403,
  45403, 45403, 45403, 45403, 45403, 45403, 45403, 45403, 45403, 45403, 45403, 0, 0, 0, 16785, 17965, 16785, 16785,
  16785, 16785, 17969, 16785, 16785, 0, 974, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 462, 0, 17505, 16785, 17507,
  16785, 17509, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 17487, 16785, 16785, 16785,
  16785, 16826, 17564, 16826, 16826, 16826, 16826, 16826, 17569, 16826, 17571, 16826, 0, 0, 0, 0, 0, 265, 0, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 0, 16826, 17711, 16826, 16826, 16826, 1216, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83968, 0, 0,
  1247, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 250, 0, 0, 16785, 16785, 17681, 16785, 17683, 16785, 16785, 312598,
  16785, 16785, 17689, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 18020, 16785, 16785, 16785, 16785, 16785, 16785,
  18027, 16826, 16785, 16785, 16785, 17694, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785,
  0, 0, 0, 0, 0, 0, 0, 0, 16785, 16785, 16785, 16785, 16785, 17807, 16785, 16785, 16785, 16785, 17727, 16826, 16826,
  312642, 16826, 16826, 16826, 17734, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826,
  338362, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 17742, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1229, 0, 0,
  1370, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1374, 0, 0, 0, 0, 0, 45403, 45403, 45403, 266587, 45403, 266240, 16785, 16785,
  16785, 16785, 16785, 16785, 17007, 16785, 16785, 16785, 16785, 309879, 17017, 16785, 16785, 17023, 16826, 16826,
  16826, 17835, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 17332, 16826,
  16826, 16826, 18094, 16826, 0, 0, 0, 0, 0, 0, 0, 0, 16785, 16785, 16785, 16785, 16785, 16785, 18135, 16785, 16785,
  16785, 0, 0, 0, 1743, 0, 1745, 16785, 18131, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 18085, 16826,
  16826, 16826, 16826, 16826, 16826, 16826, 16826, 18140, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 0, 0,
  0, 0, 0, 1766, 18189, 16826, 192512, 0, 319488, 16785, 16785, 16785, 16785, 16826, 16826, 16826, 16826, 247808, 16785,
  16785, 16785, 0, 807, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785,
  18026, 16826, 16826, 0, 0, 242, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 254, 255, 0, 0, 0, 47337, 0, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 294, 0, 0, 0, 0, 751, 0, 0, 0, 754, 0, 0, 0, 0, 0, 0, 761, 0, 283, 0, 0, 0, 0, 0, 306, 0, 307, 0, 0, 0, 0,
  307, 0, 0, 0, 278, 279, 280, 281, 0, 0, 0, 0, 0, 0, 0, 287, 0, 0, 0, 0, 0, 0, 0, 522, 0, 0, 525, 0, 0, 0, 0, 0, 1224,
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1255, 1037, 0, 0, 0, 0, 310, 0, 0, 0, 0, 0, 0, 0, 307, 0, 0, 0, 315, 0, 0, 0, 0, 778,
  0, 0, 0, 0, 0, 0, 0, 0, 787, 0, 0, 0, 0, 534, 0, 0, 0, 0, 538, 0, 0, 0, 542, 0, 0, 0, 0, 0, 109008, 109008, 109008,
  109008, 109008, 109008, 109008, 109008, 109008, 109008, 108910, 0, 0, 36864, 38912, 0, 0, 0, 326, 34816, 326, 326,
  326, 326, 0, 326, 326, 343, 343, 343, 45416, 0, 45416, 0, 283, 45416, 343, 45416, 45416, 343, 45416, 0, 343, 343, 0,
  343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 16799, 343, 343, 343, 343, 343, 343, 45416, 424, 427, 16821,
  16840, 16821, 16821, 16840, 16821, 16821, 16821, 16821, 16821, 16821, 16840, 16840, 16840, 16840, 16840, 16840, 16840,
  16840, 16840, 16821, 16821, 16840, 1, 8194, 3, 4, 41191, 41191, 47337, 0, 0, 0, 0, 0, 0, 0, 780, 0, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 110592, 0, 0, 0, 0, 0, 257, 258, 0, 0, 153600, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1213, 0, 0, 0, 0, 561, 0,
  0, 0, 0, 0, 0, 0, 561, 45403, 45624, 45403, 45403, 45403, 45403, 45403, 45403, 45403, 45403, 46125, 45403, 45403,
  45403, 0, 0, 0, 0, 0, 729, 733, 0, 0, 737, 741, 0, 0, 0, 745, 0, 45403, 268635, 45403, 45403, 45403, 45403, 45403,
  45403, 45403, 45403, 45403, 0, 0, 0, 0, 0, 269, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25340, 0, 0, 0, 0, 268288, 0, 0, 0,
  0, 0, 268288, 0, 0, 0, 0, 268288, 0, 0, 399, 400, 16785, 16994, 16785, 16785, 16785, 16785, 16785, 268689, 16785,
  16785, 16785, 16785, 16785, 16785, 16785, 16785, 218403, 16785, 16785, 16785, 16785, 16785, 16785, 0, 16785, 268689,
  16785, 16785, 16785, 16785, 439, 440, 0, 16826, 17051, 16826, 16826, 16826, 16826, 16826, 17991, 240058, 16826, 16826,
  16826, 17994, 16826, 16826, 16826, 16826, 16826, 16826, 235120, 16826, 16826, 327282, 16826, 16826, 16826, 16826,
  16826, 16826, 16826, 17309, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 17330, 16826,
  16826, 16826, 16826, 268730, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 462,
  463, 0, 0, 0, 439, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 462, 463, 120832, 465, 466, 0, 0, 4, 41191, 47822, 0, 0,
  719, 0, 0, 0, 0, 0, 0, 974, 45403, 45403, 45403, 45403, 45403, 45403, 45403, 45403, 45403, 45403, 45646, 0, 0, 0, 0,
  0, 0, 806, 719, 806, 0, 0, 45403, 45403, 45865, 45403, 45869, 45403, 45870, 45403, 45403, 45403, 45403, 45403, 45403,
  45403, 46124, 45403, 45403, 45403, 45403, 0, 0, 0, 0, 0, 1027, 0, 0, 0, 0, 0, 1033, 0, 0, 0, 374784, 45403, 45403,
  45403, 45875, 45403, 45403, 45403, 45403, 45403, 45403, 45403, 45403, 45403, 45403, 829, 0, 0, 0, 439, 0, 440, 0, 0,
  0, 440, 0, 0, 0, 0, 0, 0, 439, 440, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1006, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17231, 16785, 0, 0,
  832, 0, 0, 0, 0, 0, 0, 837, 838, 0, 0, 0, 0, 17231, 16785, 16785, 17234, 16785, 16785, 17240, 16785, 16785, 17242,
  16785, 16785, 16785, 16785, 16785, 16785, 16785, 17256, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 18021,
  16785, 16785, 16785, 16785, 16785, 16826, 16826, 16785, 17250, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785,
  16785, 16785, 16785, 16785, 16785, 16785, 16785, 17913, 16826, 16826, 17305, 16826, 16826, 16826, 16826, 16826, 16826,
  16826, 16826, 16826, 17314, 16826, 16826, 16826, 0, 0, 0, 149905, 16785, 16785, 16785, 16785, 16785, 149946, 16826,
  16826, 16826, 0, 0, 0, 0, 16785, 16785, 18169, 18170, 16785, 16785, 16826, 16826, 18175, 1024, 0, 0, 1026, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 0, 0, 0, 0, 1367, 0, 0, 0, 0, 0, 17671, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785,
  16785, 16785, 16785, 16785, 17502, 16785, 16785, 16826, 16826, 17729, 16826, 16826, 16826, 16826, 16826, 17735, 16826,
  16826, 16826, 16826, 16826, 17739, 16826, 16826, 16826, 16826, 17836, 16826, 16826, 16826, 16826, 16826, 16826, 16826,
  16826, 16826, 16826, 16826, 1189, 0, 0, 0, 1195, 0, 0, 983, 0, 989, 0, 995, 0, 1001, 0, 0, 0, 0, 0, 0, 0, 979, 0, 0,
  0, 985, 0, 0, 0, 991, 0, 0, 1417, 0, 1084, 0, 1090, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785,
  16785, 17979, 16785, 16785, 16826, 16826, 16826, 16785, 16785, 17812, 16785, 16785, 16785, 16785, 16785, 16785, 16785,
  16785, 16785, 16785, 16785, 16785, 16785, 16785, 17912, 16785, 16785, 16785, 16785, 16785, 16785, 17826, 16785, 16785,
  16785, 0, 1140, 0, 1146, 16826, 16826, 16826, 0, 0, 1781, 0, 16785, 16785, 16785, 16785, 16785, 16785, 16826, 16826,
  16826, 16826, 16826, 180666, 16826, 197050, 16826, 16826, 213434, 16826, 0, 1199, 0, 1205, 0, 1211, 0, 0, 1471, 0, 0,
  0, 0, 0, 0, 0, 980, 0, 0, 0, 986, 0, 0, 0, 992, 0, 16785, 17915, 16785, 16785, 16826, 16826, 16826, 16826, 16826,
  16826, 16826, 16826, 16826, 16826, 16826, 17925, 0, 0, 331776, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 45403, 45403, 45403,
  45403, 45403, 45403, 45403, 45403, 45403, 45403, 1627, 0, 0, 0, 0, 45403, 45403, 45403, 45403, 338267, 0, 16785,
  16785, 16785, 16785, 16785, 16785, 16785, 18056, 16785, 16785, 16826, 200331, 16826, 16826, 16826, 16826, 16785,
  16785, 16785, 16785, 338321, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16826, 16826, 16785,
  16826, 16785, 16826, 18201, 18202, 16785, 16826, 0, 0, 0, 0, 0, 0, 594, 0, 0, 0, 0, 594, 0, 0, 399, 400, 0, 0, 1656,
  0, 1658, 0, 0, 0, 1662, 0, 0, 0, 0, 45403, 16785, 16785, 16785, 0, 900, 904, 0, 15243, 17231, 16826, 16826, 16826,
  16826, 16826, 16826, 16826, 16826, 16826, 16826, 17851, 16826, 16826, 16826, 0, 0, 16785, 18078, 18079, 16785, 16785,
  16785, 16785, 16785, 16785, 16826, 16826, 16826, 16826, 18090, 16826, 18092, 18139, 16826, 16826, 16826, 16826, 16826,
  16826, 16826, 16826, 16826, 0, 0, 0, 0, 0, 0, 0, 0, 0, 47822, 0, 0, 18162, 16826, 16826, 186368, 0, 0, 0, 16785,
  18168, 16785, 16785, 16785, 16785, 16826, 18174, 16826, 16826, 16826, 16826, 17848, 16826, 16826, 16826, 16826, 16826,
  16826, 16826, 16826, 16826, 0, 1193, 0, 0, 0, 45417, 378, 45417, 378, 378, 45417, 0, 45417, 45417, 387, 45417, 378,
  387, 378, 378, 378, 387, 45417, 425, 428, 16822, 16841, 16822, 16822, 16841, 16822, 16822, 16822, 16822, 16822, 16822,
  16841, 16841, 16841, 16841, 16841, 16841, 16841, 16841, 16841, 16822, 387, 387, 378, 387, 387, 378, 378, 378, 378,
  378, 378, 378, 378, 378, 16800, 378, 16822, 16841, 1, 8194, 3, 4, 41191, 41191, 47337, 0, 0, 0, 0, 0, 0, 0, 1003, 0,
  0, 0, 0, 0, 0, 0, 0, 215040, 0, 477, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 254, 255, 0, 0, 0, 505, 0, 0, 0, 0, 0, 0, 0, 0,
  0, 0, 287, 287, 0, 0, 0, 0, 0, 0, 0, 0, 770, 0, 0, 0, 287, 0, 0, 0, 0, 0, 0, 157696, 0, 0, 0, 0, 0, 0, 0, 0, 1252, 0,
  0, 0, 0, 0, 0, 0, 0, 531, 0, 0, 0, 0, 157696, 0, 157696, 0, 539, 0, 0, 0, 0, 0, 280, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  131072, 0, 0, 0, 0, 0, 0, 0, 0, 250203, 45403, 280923, 45403, 45403, 45403, 45403, 45643, 45403, 45403, 45403, 0, 0,
  0, 0, 0, 502, 0, 0, 0, 0, 45403, 45403, 45403, 45403, 45629, 45403, 0, 0, 0, 249856, 0, 280576, 0, 0, 0, 0, 0, 0, 0,
  0, 0, 249856, 0, 280576, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 399, 400, 16785, 16785, 16785, 16785, 16785, 16785,
  250257, 16785, 280977, 16785, 16785, 16785, 16785, 16785, 17022, 16785, 16785, 16785, 16785, 16785, 16785, 17685,
  16785, 16785, 16785, 16785, 17690, 16785, 16785, 16785, 16785, 0, 644, 0, 0, 0, 0, 0, 0, 16785, 16785, 16785, 17005,
  16785, 16785, 16785, 16785, 157696, 0, 0, 565, 0, 280576, 645, 0, 17030, 16785, 16785, 16785, 0, 0, 16785, 16785,
  16785, 16785, 16785, 17274, 16785, 16785, 16785, 16785, 16785, 16785, 439, 440, 0, 16826, 16826, 17054, 16826, 16826,
  16826, 16826, 16785, 17036, 16785, 16785, 17022, 16785, 439, 440, 0, 16826, 17052, 16826, 16826, 16826, 16826, 250298,
  17070, 281018, 16826, 16826, 16826, 16826, 16826, 17084, 16826, 16826, 16826, 16826, 16826, 462, 463, 0, 0, 0, 533, 0,
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1401, 0, 0, 465, 466, 0, 0, 4, 41191, 47822, 0, 0, 0, 720, 0, 0, 0, 0, 278528, 0,
  0, 287, 287, 0, 0, 0, 766, 767, 0, 0, 0, 0, 0, 0, 0, 1017, 0, 0, 0, 0, 0, 0, 0, 0, 0, 755, 0, 0, 0, 0, 0, 0, 0, 0,
  720, 0, 0, 0, 45403, 45403, 45403, 45403, 45403, 45403, 45403, 45403, 45403, 45403, 45403, 0, 0, 45403, 45403, 45403,
  45876, 278875, 45403, 45403, 45403, 45879, 45880, 45403, 45403, 45403, 45403, 0, 0, 0, 149036, 16785, 16785, 16785,
  16785, 16785, 16785, 16785, 16785, 18057, 16785, 16826, 16826, 16826, 16826, 16826, 16826, 0, 0, 833, 0, 0, 0, 0, 0,
  833, 0, 0, 0, 0, 0, 0, 17231, 16785, 17251, 278929, 16785, 16785, 16785, 16785, 16785, 16785, 17258, 17259, 16785,
  16785, 16785, 16785, 16785, 16785, 16785, 18084, 16785, 18086, 16826, 16826, 16826, 16826, 16826, 16826, 16826,
  238010, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 17936, 16826, 1554, 0, 0, 995, 0,
  0, 0, 1001, 0, 0, 0, 0, 0, 1007, 0, 0, 0, 0, 0, 503, 0, 0, 0, 0, 45403, 45403, 45403, 45403, 45630, 45403, 1012, 0, 0,
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 106496, 0, 1049, 0, 0, 0, 0, 0, 45403, 171040, 45403, 45403, 45403, 45403,
  45403, 46117, 45403, 1279, 0, 1281, 0, 0, 0, 0, 1283, 0, 0, 0, 0, 0, 1285, 0, 0, 0, 0, 1480, 0, 0, 0, 1484, 387072, 0,
  0, 0, 0, 1487, 0, 0, 0, 0, 1493, 0, 0, 0, 0, 1498, 0, 0, 0, 0, 45403, 46559, 45403, 45403, 46120, 45403, 45403, 45403,
  45403, 45403, 45403, 45403, 45403, 45403, 171058, 0, 0, 1076, 0, 0, 0, 1007, 1074, 171058, 0, 0, 1084, 0, 0, 0, 1090,
  0, 17231, 16785, 16785, 16785, 16785, 16785, 16785, 17697, 16785, 16785, 16785, 16785, 16785, 17703, 16785, 16785, 0,
  0, 0, 0, 0, 0, 0, 0, 15243, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 266682, 16826, 16826, 16826, 16826,
  18036, 16826, 16826, 16826, 16785, 171078, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 17486, 16785,
  16785, 16785, 16785, 16785, 16785, 16785, 360849, 16785, 0, 0, 0, 0, 16826, 16826, 16826, 16785, 17492, 16785, 16785,
  16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 252305, 362897, 16785, 0,
  0, 1140, 0, 0, 0, 1146, 0, 15243, 16826, 16826, 16826, 171135, 16826, 16826, 16826, 16826, 17930, 16826, 16826, 16826,
  16826, 16826, 16826, 16826, 16826, 0, 0, 0, 0, 1687, 0, 0, 0, 0, 18076, 16826, 17552, 16826, 16826, 16826, 16826,
  16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 1359, 0, 16826, 16826, 17565, 362938, 16826,
  16826, 16826, 16826, 16826, 16826, 16826, 0, 0, 1193, 0, 0, 0, 0, 0, 1199, 0, 0, 0, 0, 1199, 0, 0, 0, 1205, 0, 0, 0,
  1211, 0, 0, 0, 354304, 0, 0, 0, 0, 794, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1020, 0, 0, 0, 1246, 276480, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 0, 0, 0, 188416, 0, 0, 0, 551, 0, 0, 0, 551, 0, 0, 45403, 45403, 45626, 45403, 45403, 45633, 45403,
  188763, 45403, 45403, 45403, 45403, 45403, 45403, 45403, 45403, 45403, 45403, 45403, 354651, 368987, 45403, 45403,
  45403, 45403, 45403, 285019, 45403, 45878, 45403, 45403, 45403, 45403, 45403, 45403, 0, 0, 0, 16785, 16785, 16785,
  16785, 16785, 16785, 16785, 16785, 16785, 0, 0, 0, 16785, 16785, 16785, 16785, 16785, 188817, 16785, 16785, 16785,
  16785, 16785, 16785, 16785, 17815, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 17687, 16785, 16785, 16785,
  16785, 16785, 16785, 379281, 16826, 16826, 188858, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826,
  17724, 16826, 16826, 16826, 0, 182272, 0, 0, 0, 0, 0, 0, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785,
  16785, 17810, 256401, 16785, 16785, 16785, 16785, 16785, 317841, 16785, 16785, 16785, 16785, 16785, 16785, 16785,
  16785, 16785, 17688, 16785, 16785, 16785, 16785, 16785, 16785, 16826, 17833, 16826, 16826, 16826, 16826, 16826, 16826,
  16826, 229818, 16826, 16826, 256442, 16826, 16826, 16826, 1712, 0, 1713, 0, 0, 1716, 0, 1718, 16785, 16785, 16785,
  16785, 16785, 16785, 439, 440, 0, 16826, 16826, 16826, 16826, 17063, 16826, 16826, 16826, 16826, 317882, 16826, 16826,
  16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 0, 0, 190464, 344064, 0, 0, 0, 196608, 212992, 0, 0, 0,
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 254, 255, 20736, 45403, 196955, 45403, 45403, 45403, 45403, 0, 0, 0, 16785, 16785,
  16785, 16785, 16785, 197009, 16785, 16785, 16785, 16785, 16785, 16785, 17827, 16785, 16785, 1322, 0, 1324, 0, 16826,
  16826, 16826, 0, 0, 0, 0, 0, 0, 0, 0, 16785, 16785, 18105, 18106, 16785, 16785, 16785, 16785, 16785, 16785, 17975,
  210488, 16785, 16785, 16785, 16785, 16785, 17982, 16826, 16826, 17985, 16826, 16826, 16826, 210501, 16826, 16826,
  16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 17999, 16826, 16826, 16826, 16826, 18030, 16826, 16826, 16826,
  16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 0, 1191, 0, 0, 0, 16785, 266641, 16785, 16785, 16785, 16785,
  16785, 16785, 16785, 16785, 16785, 18024, 16785, 16785, 16826, 16826, 16785, 16826, 18199, 18200, 16785, 16826, 16785,
  16826, 0, 0, 0, 0, 0, 0, 1622, 0, 0, 0, 0, 0, 0, 0, 0, 782, 0, 0, 0, 0, 0, 0, 0, 296960, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  397312, 0, 45403, 16785, 200321, 16826, 16826, 16826, 18066, 16826, 16826, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16785, 16785,
  16785, 16785, 16785, 16785, 16785, 17676, 16785, 16785, 16785, 16785, 16785, 16785, 17483, 16785, 16785, 16785, 16785,
  16785, 16785, 16785, 16785, 16785, 1322, 0, 1324, 0, 16826, 16826, 16826, 16826, 16826, 344506, 0, 1780, 0, 1782,
  16785, 16785, 16785, 16785, 18171, 18172, 16826, 16826, 16826, 1795, 0, 1797, 16785, 16785, 16785, 16785, 16785,
  16785, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 17924, 16826, 16826, 16826, 18177, 18178, 0,
  1796, 0, 16785, 16785, 16785, 16785, 16785, 16785, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 17923,
  16826, 16826, 16826, 16826, 16826, 18197, 18198, 16785, 16826, 16785, 16826, 16785, 16826, 0, 0, 0, 0, 0, 0, 1028, 0,
  0, 0, 0, 0, 0, 0, 0, 0, 439, 0, 440, 0, 0, 0, 0, 0, 0, 0, 45418, 379, 45418, 379, 379, 45418, 0, 45418, 45418, 0,
  45418, 379, 0, 0, 0, 563, 0, 0, 520, 474, 0, 0, 45403, 45403, 45625, 45403, 45403, 45403, 45403, 45403, 45403, 45403,
  45403, 46126, 45403, 45403, 46129, 0, 0, 0, 0, 0, 1236, 0, 0, 0, 0, 1240, 0, 0, 0, 0, 0, 0, 311296, 1237, 1238, 0, 0,
  0, 0, 1243, 0, 0, 0, 379, 379, 379, 379, 379, 379, 379, 379, 379, 379, 379, 379, 379, 16801, 379, 379, 379, 379, 379,
  379, 45418, 379, 379, 16801, 16842, 16801, 16801, 16842, 16801, 16801, 16801, 16801, 16801, 16801, 16842, 16842,
  16842, 16842, 16842, 16842, 16842, 16842, 16842, 16801, 16801, 16842, 1, 8194, 3, 4, 41191, 41191, 47337, 0, 0, 0, 0,
  0, 0, 0, 1039, 0, 0, 0, 0, 0, 0, 0, 0, 0, 269, 270, 0, 0, 0, 0, 0, 287, 0, 0, 519, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  0, 1387, 1388, 1389, 17035, 16785, 16785, 16785, 16785, 16785, 439, 440, 0, 16826, 16826, 16826, 16826, 16826, 17065,
  16826, 16826, 16826, 16826, 18067, 16826, 299008, 0, 0, 0, 0, 0, 0, 1690, 0, 16785, 18153, 16785, 16785, 16785, 16785,
  16785, 16785, 16785, 16826, 18159, 16826, 16826, 16826, 16826, 0, 959, 963, 0, 0, 0, 967, 971, 0, 47822, 0, 0, 0, 791,
  0, 0, 0, 0, 791, 0, 0, 0, 0, 0, 0, 0, 0, 0, 525, 0, 0, 0, 556, 0, 0, 16785, 16785, 16785, 16785, 17237, 16785, 16785,
  16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 17980, 16785, 16826, 16826, 16826, 16785, 16785, 17268,
  0, 0, 16785, 17237, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 17700, 16785, 16785, 16785, 16785,
  16785, 0, 16826, 16826, 16826, 17339, 0, 0, 0, 0, 0, 0, 0, 0, 0, 47822, 0, 0, 0, 0, 807, 0, 45403, 45403, 45403,
  45403, 45403, 45403, 45403, 45403, 45403, 45403, 45403, 45403, 46334, 45403, 45403, 45403, 973, 0, 0, 0, 0, 0, 0, 0,
  0, 984, 0, 0, 0, 990, 0, 0, 0, 0, 834, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17231, 0, 996, 0, 0, 0, 1002, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 0, 502, 0, 0, 0, 399, 400, 1048, 0, 0, 0, 0, 0, 0, 45403, 45403, 45403, 45403, 45403, 45403, 45403, 45403,
  45403, 45403, 45881, 45403, 45403, 45403, 0, 0, 46119, 45403, 45403, 45403, 45403, 45403, 46123, 45403, 45403, 45403,
  45403, 45403, 0, 0, 0, 0, 0, 1249, 0, 0, 0, 0, 1254, 0, 0, 0, 0, 0, 0, 135168, 135168, 135168, 135168, 135168, 135168,
  135168, 135168, 135168, 0, 16785, 16785, 16785, 17494, 16785, 16785, 16785, 16785, 16785, 17499, 16785, 16785, 16785,
  16785, 16785, 16785, 439, 440, 0, 16826, 16826, 16826, 16826, 17062, 16826, 16826, 0, 0, 1200, 0, 0, 0, 1206, 0, 0, 0,
  1212, 0, 0, 0, 0, 0, 504, 0, 0, 525, 566, 45403, 45623, 45403, 45403, 45631, 45403, 0, 1233, 0, 0, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 0, 502, 0, 45403, 45403, 46327, 45403, 45403, 45403, 45403, 45403, 45403, 45403, 45403, 45403, 45403,
  45403, 45403, 45403, 45403, 0, 0, 0, 0, 0, 0, 0, 1491, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 45403, 45403, 45403, 45867,
  45403, 45403, 45403, 45403, 45403, 45403, 16785, 16785, 16785, 16785, 18053, 16785, 16785, 16785, 16785, 16785, 16826,
  16826, 16826, 16826, 18061, 16826, 16826, 16826, 16826, 18142, 16826, 18144, 16826, 18146, 16826, 0, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 1623, 0, 0, 0, 0, 16826, 18163, 16826, 0, 0, 0, 0, 16785, 16785, 16785, 16785, 16785, 16785, 16826, 16826,
  16826, 17921, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 17723, 16826, 16826, 16826,
  16826, 0, 0, 0, 45403, 0, 45403, 299, 0, 45403, 0, 45403, 45403, 0, 45403, 309, 0, 36864, 38912, 0, 0, 0, 0, 34816, 0,
  0, 0, 0, 0, 0, 0, 1041, 45403, 45403, 45403, 45403, 45403, 45403, 45403, 45403, 45403, 45403, 45403, 45882, 45403,
  45884, 0, 0, 0, 0, 309, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16802, 0, 0, 0, 591, 0, 0, 0, 591, 0, 0, 0, 0, 602, 603, 399,
  400, 400, 400, 400, 400, 463, 466, 466, 466, 466, 466, 466, 466, 466, 466, 400, 466, 1, 8194, 3, 4, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 0, 202752, 203099, 16785, 16785, 16802, 16802, 16802, 16802, 16802, 16802, 16843, 16843, 16843, 16843,
  16843, 16843, 16843, 16843, 16843, 16802, 16843, 1, 8194, 3, 4, 41191, 41191, 47337, 0, 0, 0, 0, 0, 0, 0, 1080, 0, 0,
  0, 1086, 0, 0, 0, 17231, 16785, 16785, 16785, 16785, 16785, 17004, 16785, 16785, 16785, 16785, 16785, 16785, 16785,
  16785, 16785, 16785, 16785, 346513, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 207249,
  16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 17909, 16785, 180625, 16785, 213393, 16785, 16785,
  207290, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826,
  346554, 45403, 252251, 45403, 45403, 45403, 45403, 45403, 45403, 45403, 45403, 45403, 45403, 0, 0, 251904, 0, 0, 0,
  726, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 710, 711, 0, 0, 1655, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 45403, 16785,
  16785, 16785, 0, 901, 905, 0, 15243, 17231, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 360890,
  16826, 16826, 16826, 16826, 0, 0, 0, 0, 285, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 254, 18920, 0, 0, 0, 36864, 38912,
  285, 0, 0, 327, 34816, 327, 327, 327, 327, 0, 327, 327, 327, 327, 327, 327, 327, 327, 327, 327, 327, 16803, 327, 327,
  327, 327, 45419, 0, 45419, 0, 0, 45419, 327, 45419, 45419, 327, 45419, 0, 327, 327, 327, 327, 327, 327, 45419, 327,
  327, 16803, 16844, 16803, 16803, 16844, 16803, 16803, 16803, 16803, 16803, 16803, 16844, 16844, 16844, 16844, 16844,
  16844, 16844, 16844, 16844, 16803, 16803, 16844, 1, 8194, 3, 4, 41191, 41191, 47337, 0, 0, 0, 0, 0, 0, 0, 1081, 0, 0,
  0, 1087, 0, 0, 0, 17231, 16785, 16785, 16785, 16785, 16785, 17041, 16785, 439, 440, 0, 16826, 16826, 16826, 16826,
  16826, 16826, 16826, 16826, 17992, 17993, 16826, 16826, 16826, 16826, 16826, 16826, 16804, 16804, 16804, 16804, 16804,
  16804, 16845, 16845, 16845, 16845, 16845, 16845, 16845, 16845, 16845, 16804, 16845, 1, 8194, 3, 4, 41191, 41191,
  47337, 0, 0, 0, 0, 0, 0, 0, 1250, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 231424, 0, 0, 0, 0, 0, 287, 0, 0, 0, 0, 0, 521, 0, 0,
  0, 0, 0, 0, 0, 0, 0, 798, 0, 0, 0, 0, 0, 0, 0, 0, 593, 0, 0, 0, 0, 0, 0, 0, 0, 593, 0, 0, 0, 0, 0, 1259, 0, 0, 0, 0,
  0, 0, 0, 0, 45403, 45403, 45403, 46114, 45403, 45403, 45403, 45403, 45403, 16785, 16785, 16785, 16785, 17005, 16785,
  16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 18058, 16826, 16826, 16826, 16826, 16826, 16785,
  17281, 16785, 0, 0, 0, 0, 15243, 17231, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 16826, 215482, 16826, 16826,
  17547, 16826, 16826, 16826, 16826, 0, 0, 998, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 259, 0, 0, 0, 0, 0, 1202, 0, 0,
  0, 1208, 0, 0, 0, 0, 0, 0, 0, 0, 4096, 0, 0, 0, 0, 0, 0, 4096, 257, 258, 0, 0, 0, 0, 0, 165888, 0, 0, 0, 0, 0, 0, 0,
  0, 14336, 0, 0, 0, 0, 0, 0, 0, 16785, 16785, 16785, 16785, 16785, 17043, 439, 440, 0, 16826, 16826, 16826, 16826,
  16826, 16826, 16826, 16826, 218425, 227770, 16826, 16826, 16826, 16826, 16826, 16826, 465, 466, 0, 0, 4, 41191, 47822,
  0, 0, 0, 0, 0, 0, 370688, 0, 0, 0, 0, 899, 903, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 96256, 0, 0, 0, 0, 305152, 0, 0,
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 503, 0, 45403, 45403, 45403, 45403, 305499, 45403, 45403, 45403, 45403, 45403,
  45403, 45403, 0, 0, 0, 0, 0, 1395, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 313344, 0, 0, 0, 0, 16785, 16785, 16785, 16785,
  16785, 305553, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 16785, 377233, 16826, 16826, 16826,
  16826, 16826, 16826, 0, 0, 0, 217088, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1476, 0, 0, 45403, 45403, 45403, 45403,
  217435, 45403, 45403, 45403, 45403, 45403, 45403, 45403, 45403, 45403, 45403, 45403, 45403, 45403, 45403, 45403,
  45403, 379227, 0, 1556, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 604, 400, 0, 0, 36864, 38912, 0, 0, 0, 0, 34816, 0,
  0, 0, 0, 337, 0, 0, 0, 0, 977, 0, 0, 982, 0, 0, 0, 988, 0, 0, 0, 994, 0, 0, 399679, 399679, 399360, 0, 0, 0, 399679,
  0, 0, 0, 0, 0, 399360, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1475, 0, 0, 0, 0, 399360, 0, 0, 399360, 399360, 399360, 0,
  399360, 0, 0, 0, 0, 0, 399360, 399360, 0, 1, 8194, 3, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 503, 0, 0, 0, 399, 400, 0,
  403456, 403456, 403456, 403456, 403456, 403456, 403456, 403456, 403456, 403456, 403456, 403456, 403456, 0, 403456,
  403456, 1, 8194, 3, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 504, 601, 0, 0, 399, 400, 403456, 403456, 403456, 403456, 403456,
  403456, 403456, 403456, 403456, 0, 0, 0, 0, 0, 0, 0, 1260, 0, 0, 0, 0, 0, 1266, 0, 46324, 45403, 0, 0, 320, 320, 0, 0,
  0, 0, 320, 0, 0, 0, 0, 0, 0, 0, 1482, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 131072, 0, 0, 0, 131072, 0, 405504, 405504,
  405504, 0, 0, 0, 0, 0, 0, 405504, 0, 0, 405504, 0, 0, 405504, 405504, 0, 405504, 405504, 405504, 405504, 405504,
  405504, 405504, 405504, 405504, 405504, 405504, 0, 405504, 405504, 1, 8194, 3, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 511,
  0, 0, 0, 287, 287, 405504, 405504, 405504, 405504, 405504, 405504, 405504, 405504, 405504, 0, 0, 0, 0, 0, 0, 0, 1495,
  0, 0, 0, 323584, 0, 0, 0, 45403, 45403, 0, 0, 1, 8194, 3, 4, 41191, 41191, 47337, 0, 0, 0, 0, 0, 0, 0, 1660, 1661, 0,
  0, 1663, 0, 0, 45403, 16785, 16785, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096,
  4096, 0, 4096, 0, 4096, 4096, 0, 4096, 0, 0, 4096, 0, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096,
  4096, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 605, 606
);

(:~
 : The DFA-state to expected-token-set mapping.
 :)
declare variable $p:EXPECTED as xs:integer+ :=
(
  199, 206, 214, 222, 335, 230, 244, 252, 271, 278, 302, 314, 236, 291, 322, 330, 343, 294, 306, 351, 366, 380, 358,
  574, 372, 388, 285, 396, 404, 412, 420, 428, 436, 1340, 444, 681, 446, 715, 715, 569, 1070, 715, 715, 715, 460, 715,
  715, 715, 714, 715, 476, 472, 263, 715, 715, 715, 715, 454, 1228, 487, 495, 503, 511, 519, 534, 542, 556, 678, 564,
  582, 590, 600, 853, 608, 592, 699, 616, 988, 624, 632, 860, 640, 655, 663, 671, 466, 867, 647, 689, 707, 1243, 724,
  732, 747, 755, 1181, 994, 763, 771, 812, 1016, 785, 806, 1336, 838, 846, 875, 883, 1395, 891, 899, 907, 927, 935, 943,
  958, 966, 973, 981, 1002, 1010, 1028, 1036, 1057, 1044, 792, 1052, 1065, 1078, 950, 1093, 1101, 1020, 1109, 1117,
  1085, 1125, 1133, 1141, 1149, 1166, 1174, 258, 1189, 1197, 1205, 798, 1213, 1221, 1297, 1236, 1258, 1266, 1274, 1282,
  1290, 1305, 526, 1313, 777, 914, 1321, 818, 1329, 1250, 1348, 1356, 1364, 1372, 1380, 1388, 548, 1403, 1411, 715, 824,
  716, 919, 715, 1419, 738, 695, 478, 715, 697, 739, 479, 716, 716, 715, 828, 830, 1156, 1422, 1421, 479, 715, 715,
  1159, 1430, 1968, 1512, 1434, 1438, 1447, 1447, 1447, 1448, 1442, 1446, 1447, 1447, 1447, 1459, 1447, 1452, 1456,
  1463, 1467, 1471, 1475, 1478, 1482, 1486, 1490, 1494, 1498, 1502, 2452, 2704, 2544, 1968, 1968, 2384, 2385, 1516,
  1968, 1968, 1553, 1968, 1765, 2385, 2385, 2387, 1968, 2182, 1642, 1642, 1616, 2183, 2185, 1569, 1570, 1522, 1526,
  1968, 1504, 2093, 1968, 1968, 1794, 1968, 1999, 1968, 1968, 1968, 1968, 1968, 1968, 2433, 1968, 1530, 1968, 1968,
  2111, 1968, 1968, 1772, 2385, 2386, 1968, 1640, 1642, 1642, 1642, 1642, 1656, 1659, 1640, 1644, 1657, 2182, 1642,
  1642, 1642, 1642, 1642, 1642, 1642, 1643, 1570, 1570, 1635, 1642, 1645, 1570, 1570, 1570, 1570, 1570, 2189, 1577,
  1583, 1606, 2189, 1539, 1503, 1506, 2092, 1968, 1968, 1533, 2187, 1568, 1570, 1570, 1570, 1570, 1570, 1575, 1581,
  1587, 1505, 1506, 2091, 2094, 1968, 1968, 2681, 1510, 1968, 1968, 2903, 1968, 2060, 1968, 1772, 2385, 2385, 1785,
  1642, 2088, 1599, 1968, 1968, 1968, 1968, 1767, 2386, 1641, 1642, 1642, 2186, 1570, 1570, 1658, 2184, 1642, 1642,
  1642, 1642, 1656, 1570, 1570, 1660, 1968, 1766, 1614, 1642, 2185, 1570, 2188, 1605, 1968, 1968, 1968, 1968, 1772,
  1570, 1570, 1968, 2176, 1642, 2187, 1571, 3070, 1570, 1622, 1641, 2187, 1628, 1644, 1632, 2186, 1639, 1649, 1653,
  1670, 2828, 1968, 1675, 1687, 1691, 1695, 1696, 1696, 1696, 1702, 1709, 1706, 1696, 1696, 1697, 1716, 1698, 1713,
  1719, 1723, 1727, 1731, 1735, 1739, 1743, 1746, 1750, 1754, 2671, 1906, 2544, 2872, 1968, 1968, 1968, 1760, 2527,
  1771, 1968, 1968, 1968, 1968, 1968, 1968, 1968, 2000, 1790, 1997, 1968, 1968, 1869, 1798, 1968, 1968, 1968, 1968,
  1968, 2434, 1968, 1968, 1968, 1968, 1968, 2115, 1968, 1968, 1968, 1968, 1968, 2348, 1968, 1968, 1968, 1968, 1968,
  1968, 1968, 2033, 1968, 1822, 1836, 1840, 1847, 1843, 1851, 1854, 1856, 1860, 1863, 1866, 1968, 1875, 1968, 1968,
  1871, 1881, 1968, 1968, 1559, 1968, 2317, 1897, 2922, 2374, 1984, 1887, 1968, 2710, 1968, 2260, 1892, 1901, 1968,
  1968, 1905, 1911, 2342, 1912, 1968, 1535, 1994, 1968, 1968, 1968, 1968, 2275, 1968, 2724, 1968, 1968, 2806, 1968,
  1968, 1920, 1968, 2698, 2916, 1917, 1518, 1924, 1968, 1968, 1968, 1968, 1968, 3030, 3035, 1968, 2073, 1934, 1877,
  1938, 1968, 1968, 1968, 1943, 1956, 1968, 1968, 2805, 1881, 1968, 1968, 1968, 1968, 1784, 1968, 1968, 1968, 1766,
  1610, 1642, 1642, 1644, 1962, 1895, 1919, 2170, 1968, 1968, 2074, 1967, 1973, 1990, 1968, 1968, 1968, 2032, 1968,
  2243, 2004, 1991, 1977, 1991, 1968, 1968, 1968, 1968, 1968, 1623, 1930, 1968, 1981, 1968, 2050, 1968, 2243, 1988,
  1799, 1968, 1968, 2008, 2096, 2021, 2878, 2027, 1968, 2803, 2807, 1968, 2697, 1919, 2041, 1779, 2048, 2507, 1968,
  2054, 1968, 1968, 2804, 2079, 2437, 2078, 2373, 2085, 2100, 2729, 2107, 1968, 1624, 2131, 2137, 2601, 2141, 2145,
  2149, 2512, 2372, 2204, 2202, 1968, 2356, 2360, 2716, 2437, 2358, 1968, 2361, 2370, 2204, 2203, 2518, 2359, 2202,
  3044, 2360, 2718, 2204, 2205, 1968, 1756, 1950, 1968, 1968, 1968, 1968, 1968, 1776, 2432, 1968, 2153, 2155, 2159,
  2163, 2163, 2163, 1968, 1968, 1968, 1992, 1968, 1968, 1968, 1968, 1968, 1968, 1968, 2897, 2880, 1968, 1968, 1945,
  1919, 1968, 2167, 2435, 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1992, 2180, 2193, 2011, 2201, 2209, 1968,
  2398, 2996, 1968, 2216, 1968, 1968, 1968, 1958, 1968, 1968, 1968, 1996, 1968, 1968, 1968, 1968, 1968, 1946, 1968,
  2929, 2349, 1968, 1968, 2466, 2220, 2242, 2226, 2181, 2734, 1968, 1968, 2534, 2230, 1968, 2930, 2436, 1968, 2691,
  3067, 2241, 2247, 1968, 2381, 1968, 1968, 2416, 2251, 1968, 1968, 1968, 2117, 2907, 2570, 2965, 1968, 2259, 2310,
  1968, 2691, 2264, 2241, 2272, 1968, 1968, 1968, 2612, 1968, 2197, 1968, 1968, 1968, 2656, 1661, 2426, 2793, 2462,
  2544, 1968, 1968, 2282, 2341, 1968, 2363, 1968, 1968, 1968, 2577, 2255, 1968, 1968, 1968, 2212, 2848, 2964, 1968,
  1968, 1968, 2289, 1968, 2081, 1968, 1968, 1968, 1968, 1968, 1995, 1968, 1968, 1968, 2890, 1968, 3070, 2563, 2299,
  1968, 3069, 2541, 2438, 1968, 2305, 1968, 2362, 2330, 1968, 1968, 1968, 2803, 2807, 1968, 1968, 2697, 2642, 2058,
  1780, 1968, 2847, 2064, 1968, 1545, 1968, 1968, 2563, 2637, 2121, 2127, 2608, 2340, 1968, 1968, 2444, 1968, 2309,
  2436, 2314, 2241, 3043, 2422, 1968, 2328, 1968, 2337, 2123, 1968, 2353, 1968, 1968, 1601, 2367, 1564, 2687, 1968,
  2378, 1968, 1600, 2391, 2689, 2395, 1968, 2406, 2689, 2293, 2101, 2408, 2291, 1968, 1968, 1968, 2940, 2944, 1968,
  1968, 1968, 1968, 1968, 1999, 1968, 1968, 1806, 2412, 2420, 2102, 2431, 2442, 2406, 3050, 1806, 2449, 2459, 1809,
  1968, 1968, 1968, 1534, 2860, 1968, 1968, 1968, 1968, 2470, 1535, 1968, 1968, 1968, 3038, 1968, 2635, 1968, 1969,
  1968, 1968, 2564, 2474, 1562, 2295, 2301, 2478, 2482, 2486, 2490, 2494, 2497, 2496, 2501, 2502, 2506, 1968, 2511,
  2516, 1968, 1968, 2740, 2583, 1968, 2196, 1968, 1664, 1968, 2522, 1968, 1968, 2031, 1968, 2037, 1991, 1968, 1968,
  1968, 1968, 1991, 1968, 1968, 1952, 2526, 2531, 1968, 2947, 2133, 2538, 2549, 1882, 2555, 1888, 2562, 2568, 1968,
  2574, 1968, 1968, 1968, 2444, 1968, 1968, 1968, 1968, 1618, 1968, 1968, 2662, 1542, 1592, 1968, 1968, 2581, 1968,
  2910, 2636, 1664, 1968, 2976, 1968, 1968, 2588, 1968, 2592, 1968, 1968, 3010, 2605, 1968, 1968, 1968, 1591, 1968,
  2978, 1968, 3064, 1992, 1682, 1968, 1968, 2596, 1912, 1968, 2627, 1968, 1968, 2620, 1912, 1968, 2624, 1968, 1968,
  1968, 1968, 1968, 1968, 2268, 1968, 1968, 2631, 2599, 1968, 1968, 1968, 1589, 1593, 1556, 2103, 1969, 2641, 3108,
  1682, 2814, 2641, 1992, 2647, 1680, 1968, 1968, 1968, 1814, 2680, 1968, 2801, 1968, 1968, 1968, 1992, 2653, 1600,
  1968, 3003, 1968, 1681, 2669, 1968, 2675, 1968, 2800, 1968, 1968, 1813, 2679, 1968, 1594, 1968, 2802, 1968, 2821,
  1595, 1683, 1968, 1969, 2685, 3109, 1913, 1832, 2695, 1992, 2702, 1592, 2708, 2685, 1811, 1831, 2695, 2033, 2714,
  2517, 2722, 2845, 1968, 1549, 1665, 2845, 2545, 1968, 1968, 2033, 1968, 1968, 1968, 1968, 1968, 1968, 1969, 2323,
  2847, 1548, 3061, 2728, 2785, 1968, 2324, 2545, 1665, 2445, 1927, 2891, 1666, 2890, 1968, 1968, 2234, 1792, 1968,
  1883, 2237, 2079, 1968, 2657, 1968, 2733, 1968, 2835, 2067, 2738, 2744, 2749, 2753, 2757, 2761, 2765, 2769, 2773,
  2777, 2781, 2789, 2789, 2783, 1968, 2875, 1996, 2095, 2266, 1968, 2798, 1968, 2811, 1968, 2070, 2616, 1968, 1968,
  1906, 2818, 2825, 2551, 1968, 1968, 2455, 1803, 1968, 1963, 2023, 1818, 2658, 2887, 2838, 2842, 2643, 1968, 1671,
  1968, 1968, 2465, 3068, 2174, 2044, 1968, 1661, 1968, 1968, 2990, 3000, 1968, 1968, 2982, 1968, 2401, 2584, 1968,
  1968, 1968, 1968, 2665, 2853, 1968, 2857, 1968, 1968, 1968, 2848, 2864, 2869, 1968, 1678, 1968, 1968, 1968, 1968,
  2884, 2427, 2794, 2109, 2895, 1968, 2901, 1968, 2402, 2936, 1968, 1968, 1968, 1968, 2665, 2907, 2848, 2832, 1968,
  1793, 1993, 1968, 1968, 1906, 2914, 1968, 1968, 1968, 1968, 2849, 2865, 2920, 2837, 2926, 2895, 1968, 1968, 2117,
  2934, 2636, 1998, 1968, 1906, 2951, 1828, 2955, 1968, 1907, 1939, 2969, 1968, 1994, 1968, 2278, 2973, 1968, 1968,
  2558, 2286, 1968, 1968, 1968, 1968, 1764, 1968, 1968, 1968, 1995, 1825, 2973, 1968, 1662, 1968, 2649, 3077, 1968,
  2980, 2984, 2320, 1968, 1663, 2648, 2992, 1968, 2986, 2614, 2960, 1968, 2994, 2992, 1786, 1968, 2959, 2958, 2745,
  2957, 2331, 3007, 2848, 3019, 3014, 1968, 3018, 2958, 2221, 2222, 2332, 2333, 3031, 3023, 3025, 1968, 1968, 3043,
  1968, 1968, 2563, 2346, 2314, 3031, 1968, 2424, 3042, 3048, 3054, 3026, 3058, 2017, 3074, 3081, 2014, 3085, 3089,
  3092, 3096, 3099, 3101, 3105, 1968, 2414, 1968, 1968, 1968, 1968, 1968, 1968, 1968, 2080, 1968, 3354, 3221, 3312,
  3592, 3213, 3225, 3360, 3436, 3762, 3115, 3574, 3121, 3580, 3117, 3575, 3120, 3577, 3578, 3578, 3578, 3578, 3761,
  3119, 3577, 3578, 3145, 3577, 3134, 3121, 3578, 3579, 3575, 3576, 3136, 3578, 3578, 3578, 3144, 3437, 3151, 3161,
  3152, 3147, 3154, 3149, 3153, 3149, 3153, 3153, 3150, 3153, 3156, 3153, 3160, 3157, 3159, 3162, 3172, 3185, 3181,
  3184, 3183, 3187, 3189, 3192, 3189, 3190, 3193, 3194, 3354, 3221, 3842, 3637, 3360, 3360, 3360, 3164, 3164, 3164,
  3198, 3462, 3196, 3360, 3360, 3113, 3345, 3267, 3480, 3360, 3360, 3126, 3557, 3288, 3288, 3846, 3847, 3210, 3201,
  3204, 3269, 3360, 3855, 3463, 3360, 3168, 3360, 3360, 3360, 3197, 3270, 3210, 3211, 3360, 3168, 3360, 3444, 3165,
  3591, 3360, 3170, 3360, 3360, 3460, 3717, 3840, 3840, 3360, 3197, 3123, 3360, 3197, 3358, 3360, 3197, 3360, 3360,
  3366, 3246, 3288, 3287, 3288, 3288, 3288, 3288, 3360, 3288, 3846, 3208, 3208, 3208, 3208, 3208, 3209, 3210, 3210,
  3210, 3210, 3210, 3271, 3360, 3360, 3126, 3719, 3460, 3360, 3360, 3360, 3719, 3460, 3167, 3360, 3360, 3360, 3214,
  3360, 3208, 3210, 3210, 3360, 3360, 3267, 3267, 3360, 3444, 3267, 3444, 3445, 3445, 3360, 3360, 3126, 3714, 3288,
  3360, 3360, 3360, 3252, 3444, 3288, 3447, 3360, 3444, 3288, 3447, 3360, 3445, 3443, 3444, 3445, 3288, 3360, 3444,
  3445, 3445, 3445, 3445, 3446, 3288, 3289, 3446, 3288, 3447, 3445, 3288, 3446, 3446, 3446, 3288, 3288, 3288, 3447,
  3360, 3360, 3360, 3219, 3360, 3360, 3360, 3225, 3356, 3446, 3360, 3360, 3360, 3265, 3469, 3349, 3232, 3360, 3197,
  3360, 3361, 3364, 3360, 3360, 3360, 3760, 3349, 3234, 3350, 3233, 3235, 3326, 3376, 3259, 3276, 3234, 3234, 3234,
  3234, 3236, 3234, 3285, 3355, 3303, 3277, 3315, 3259, 3260, 3234, 3237, 3306, 3308, 3328, 3234, 3361, 3234, 3325,
  3316, 3234, 3374, 3309, 3378, 3375, 3380, 3381, 3386, 3385, 3393, 3278, 3394, 3397, 3400, 3399, 3400, 3401, 3403,
  3404, 3406, 3408, 3412, 3411, 3409, 3423, 3424, 3360, 3234, 3395, 3304, 3414, 3416, 3418, 3420, 3417, 3422, 3427,
  3360, 3360, 3127, 3169, 3349, 3720, 3360, 3238, 3647, 3360, 3360, 3360, 3266, 3267, 3267, 3435, 3360, 3360, 3360,
  3267, 3641, 3360, 3457, 3360, 3205, 3450, 3311, 3269, 3360, 3438, 3360, 3360, 3444, 3360, 3361, 3459, 3718, 3360,
  3360, 3360, 3475, 3360, 3467, 3122, 3321, 3357, 3360, 3141, 3257, 3819, 3360, 3214, 3363, 3389, 3433, 3364, 3364,
  3360, 3360, 3361, 3746, 3754, 3472, 3360, 3360, 3272, 3167, 3474, 3489, 3360, 3219, 3360, 3461, 3664, 3333, 3363,
  3142, 3360, 3360, 3360, 3130, 3131, 3775, 3491, 3493, 3495, 3497, 3504, 3503, 3506, 3508, 3500, 3499, 3505, 3501,
  3506, 3510, 3512, 3515, 3514, 3516, 3515, 3518, 3519, 3519, 3519, 3519, 3519, 3521, 3521, 3521, 3522, 3523, 3360,
  3219, 3430, 3256, 3339, 3529, 3569, 3525, 3360, 3360, 3128, 3479, 3470, 3360, 3360, 3360, 3347, 3262, 3541, 3360,
  3360, 3360, 3348, 3356, 3769, 3359, 3360, 3225, 3360, 3360, 3206, 3531, 3540, 3360, 3861, 3543, 3545, 3360, 3360,
  3360, 3349, 3850, 3548, 3139, 3360, 3360, 3360, 3352, 3360, 3550, 3537, 3360, 3360, 3360, 3359, 3124, 3125, 3687,
  3357, 3360, 3775, 3360, 3225, 3360, 3567, 3360, 3733, 3247, 3249, 3688, 3360, 3360, 3360, 3354, 3482, 3559, 3360,
  3360, 3163, 3166, 3360, 3479, 3562, 3360, 3360, 3163, 3454, 3360, 3525, 3360, 3360, 3205, 3357, 3440, 3360, 3360,
  3360, 3356, 3248, 3360, 3360, 3360, 3360, 3124, 3360, 3450, 3478, 3268, 3169, 3479, 3212, 3776, 3126, 3311, 3468,
  3357, 3809, 3202, 3202, 3311, 3268, 3776, 3357, 3360, 3360, 3360, 3361, 3360, 3360, 3360, 3362, 3360, 3360, 3360,
  3342, 3169, 3240, 3212, 3776, 3440, 3360, 3567, 3360, 3226, 3481, 3371, 3220, 3281, 3368, 3229, 3360, 3865, 3312,
  3357, 3360, 3360, 3218, 3292, 3360, 3582, 3312, 3593, 3360, 3564, 3360, 3360, 3360, 3363, 3450, 3169, 3312, 3565,
  3126, 3311, 3313, 3360, 3226, 3625, 3631, 3835, 3357, 3360, 3360, 3239, 3360, 3582, 3841, 3212, 3593, 3168, 3312,
  3360, 3360, 3253, 3360, 3450, 3169, 3312, 3360, 3228, 3568, 3360, 3250, 3214, 3360, 3251, 3360, 3360, 3546, 3339,
  3321, 3360, 3360, 3360, 3364, 3360, 3168, 3269, 3360, 3448, 3164, 3816, 3198, 3198, 3198, 3198, 3360, 3360, 3360,
  3168, 3168, 3583, 3360, 3360, 3360, 3433, 3360, 3360, 3360, 3653, 3585, 3360, 3360, 3360, 3253, 3840, 3360, 3843,
  3360, 3360, 3261, 3129, 3692, 3567, 3360, 3360, 3263, 3718, 3477, 3198, 3595, 3357, 3597, 3720, 3269, 3360, 3200,
  3360, 3671, 3360, 3360, 3476, 3391, 3599, 3601, 3603, 3604, 3612, 3611, 3605, 3607, 3606, 3615, 3617, 3619, 3607,
  3607, 3607, 3621, 3613, 3607, 3613, 3607, 3608, 3609, 3609, 3609, 3609, 3252, 3360, 3720, 3126, 3168, 3636, 3132,
  3367, 3623, 3360, 3360, 3266, 3445, 3628, 3481, 3360, 3360, 3360, 3445, 3445, 3445, 3288, 3288, 3288, 3208, 3208,
  3848, 3360, 3630, 3360, 3252, 3439, 3587, 3360, 3633, 3360, 3360, 3360, 3449, 3360, 3360, 3537, 3230, 3635, 3650,
  3360, 3261, 3654, 3481, 3360, 3643, 3649, 3646, 3340, 3360, 3360, 3368, 3440, 3360, 3370, 3165, 3817, 3319, 3199,
  3686, 3320, 3322, 3721, 3360, 3441, 3451, 3199, 3686, 3573, 3360, 3368, 3360, 3360, 3360, 3450, 3360, 3652, 3244,
  3320, 3858, 3245, 3320, 3322, 3859, 3670, 3320, 3322, 3857, 3360, 3360, 3360, 3534, 3360, 3660, 3341, 3360, 3360,
  3360, 3268, 3360, 3368, 3244, 3346, 3360, 3279, 3357, 3371, 3867, 3360, 3243, 3347, 3663, 3859, 3676, 3245, 3573,
  3322, 3360, 3286, 3360, 3360, 3684, 3680, 3360, 3360, 3344, 3685, 3691, 3338, 3360, 3360, 3295, 3294, 3360, 3662,
  3245, 3322, 3443, 3252, 3719, 3126, 3269, 3360, 3433, 3341, 3360, 3293, 3273, 3360, 3219, 3856, 3360, 3225, 3360,
  3357, 3483, 3360, 3442, 3667, 3360, 3360, 3360, 3551, 3360, 3360, 3360, 3673, 3291, 3670, 3322, 3360, 3360, 3360,
  3548, 3691, 3269, 3360, 3360, 3338, 3360, 3360, 3673, 3675, 3718, 3360, 3294, 3137, 3322, 3537, 3448, 3360, 3360,
  3360, 3442, 3572, 3360, 3367, 3368, 3360, 3294, 3321, 3567, 3360, 3360, 3168, 3824, 3366, 3552, 3246, 3360, 3294,
  3481, 3360, 3267, 3267, 3267, 3267, 3360, 3360, 3360, 3369, 3365, 3678, 3365, 3551, 3680, 3360, 3323, 3640, 3360,
  3261, 3813, 3340, 3360, 3360, 3433, 3360, 3682, 3439, 3218, 3552, 3360, 3360, 3363, 3360, 3360, 3347, 3570, 3552,
  3389, 3360, 3360, 3347, 3669, 3360, 3360, 3322, 3360, 3360, 3682, 3140, 3360, 3360, 3360, 3269, 3360, 3360, 3360,
  3294, 3360, 3363, 3680, 3360, 3360, 3357, 3360, 3360, 3360, 3363, 3389, 3360, 3344, 3214, 3360, 3140, 3197, 3140,
  3433, 3363, 3389, 3363, 3360, 3585, 3360, 3346, 3360, 3360, 3349, 3310, 3318, 3241, 3123, 3691, 3818, 3319, 3214,
  3241, 3360, 3694, 3697, 3382, 3174, 3383, 3173, 3175, 3176, 3699, 3701, 3177, 3179, 3178, 3703, 3705, 3707, 3179,
  3179, 3179, 3179, 3709, 3711, 3712, 3712, 3712, 3712, 3712, 3360, 3360, 3360, 3564, 3126, 3360, 3360, 3360, 3587,
  3443, 3714, 3360, 3360, 3360, 3589, 3425, 3360, 3360, 3723, 3432, 3360, 3360, 3360, 3656, 3347, 3217, 3431, 3360,
  3347, 3221, 3165, 3727, 3360, 3343, 3367, 3360, 3368, 3860, 3360, 3360, 3360, 3170, 3538, 3372, 3360, 3360, 3368,
  3741, 3728, 3554, 3337, 3360, 3347, 3442, 3452, 3455, 3360, 3360, 3360, 3718, 3439, 3215, 3336, 3360, 3360, 3368,
  3833, 3216, 3335, 3555, 3360, 3347, 3442, 3571, 3317, 3241, 3123, 3360, 3360, 3360, 3626, 3360, 3365, 3291, 3573,
  3360, 3735, 3360, 3201, 3365, 3334, 3475, 3527, 3139, 3360, 3360, 3390, 3390, 3388, 3526, 3138, 3360, 3347, 3442,
  3736, 3349, 3744, 3242, 3360, 3360, 3360, 3389, 3360, 3361, 3746, 3475, 3527, 3360, 3387, 3389, 3360, 3349, 3388,
  3139, 3361, 3749, 3464, 3716, 3439, 3214, 3360, 3360, 3360, 3720, 3469, 3537, 3360, 3360, 3168, 3341, 3752, 3360,
  3360, 3360, 3854, 3481, 3746, 3756, 3138, 3360, 3349, 3459, 3638, 3360, 3360, 3360, 3744, 3123, 3360, 3349, 3815,
  3264, 3352, 3360, 3360, 3360, 3429, 3360, 3361, 3746, 3758, 3138, 3765, 3138, 3360, 3360, 3360, 3855, 3469, 3360,
  3360, 3360, 3439, 3218, 3360, 3360, 3344, 3360, 3484, 3360, 3360, 3360, 3439, 3360, 3360, 3764, 3139, 3360, 3360,
  3448, 3165, 3167, 3360, 3360, 3124, 3251, 3360, 3465, 3360, 3360, 3360, 3448, 3360, 3360, 3567, 3124, 3225, 3360,
  3360, 3459, 3718, 3356, 3360, 3483, 3360, 3360, 3355, 3360, 3360, 3219, 3589, 3695, 3750, 3360, 3349, 3318, 3241,
  3332, 3444, 3360, 3360, 3360, 3767, 3331, 3225, 3771, 3767, 3225, 3360, 3768, 3773, 3773, 3778, 3774, 3778, 3780,
  3781, 3784, 3790, 3782, 3787, 3792, 3794, 3795, 3797, 3786, 3787, 3787, 3787, 3787, 3799, 3785, 3787, 3785, 3788,
  3801, 3802, 3802, 3360, 3360, 3482, 3357, 3802, 3802, 3802, 3802, 3360, 3655, 3664, 3333, 3363, 3330, 3360, 3360,
  3360, 3485, 3360, 3360, 3360, 3859, 3339, 3529, 3470, 3360, 3329, 3804, 3341, 3360, 3352, 3758, 3139, 3806, 3657,
  3341, 3360, 3352, 3765, 3139, 3274, 3808, 3811, 3360, 3353, 3224, 3322, 3740, 3742, 3658, 3360, 3355, 3867, 3360,
  3461, 3453, 3665, 3443, 3364, 3585, 3360, 3357, 3482, 3360, 3360, 3360, 3368, 3261, 3821, 3658, 3360, 3823, 3826,
  3256, 3346, 3360, 3360, 3690, 3460, 3261, 3827, 3264, 3256, 3319, 3829, 3657, 3341, 3360, 3360, 3715, 3360, 3197,
  3718, 3360, 3205, 3360, 3360, 3239, 3356, 3279, 3831, 3357, 3219, 3360, 3867, 3360, 3356, 3360, 3360, 3356, 3360,
  3747, 3360, 3360, 3486, 3834, 3265, 3360, 3360, 3360, 3487, 3360, 3626, 3529, 3341, 3360, 3360, 3718, 3685, 3833,
  3837, 3360, 3360, 3531, 3360, 3122, 3658, 3360, 3360, 3533, 3536, 3665, 3443, 3839, 3360, 3360, 3718, 3691, 3360,
  3626, 3341, 3360, 3239, 3214, 3360, 3354, 3845, 3129, 3737, 3213, 3529, 3341, 3360, 3360, 3725, 3553, 3222, 3219,
  3360, 3322, 3254, 3360, 3360, 3360, 3551, 3443, 3360, 3360, 3360, 3833, 3346, 3360, 3360, 3360, 3845, 3255, 3242,
  3481, 3665, 3443, 3364, 3360, 3360, 3730, 3732, 3360, 3360, 3368, 3845, 3242, 3481, 3360, 3360, 3370, 3290, 3219,
  3529, 3360, 3360, 3551, 3863, 3360, 3360, 3643, 3645, 3360, 3368, 3852, 3360, 3360, 3730, 3868, 3443, 3360, 3443,
  3360, 3360, 3739, 3334, 3368, 3290, 3360, 3444, 3368, 3290, 3360, 3360, 3360, 3368, 3368, 3369, 3369, 3360, 3360,
  3360, 3281, 3360, 3367, 3360, 3367, 3367, 3368, 3368, 3360, 3360, 3744, 3242, 3367, 3367, 3360, 3360, 3360, 3560,
  3368, 3367, 3360, 3360, 3682, 3360, 3369, 3360, 3371, 3227, 3367, 3367, 3368, 3360, 3360, 3775, 3360, 3352, 3573,
  3360, 3349, 3340, 3360, 3360, 3360, 3444, 3367, 3360, 3866, 3360, 3360, 3826, 3346, 3363, 3367, 3282, 3229, 3280,
  3221, 3283, 3296, 3297, 3297, 3297, 3297, 3870, 3298, 3297, 3872, 3873, 3299, 3351, 3301, 3351, 3351, 3351, 3300,
  3875, 3877, 3878, 3360, 3361, 3364, 3361, 3364, 0, 545259520, 16781312, 142606336, 12582912, 285212672, 16784896,
  1090519040, 1090519040, 16777216, 33554432, 0, 512, 2048, 0, 896, 2048, 4096, -1795112960, 134217728, -2147483648,
  135421952, 1351680, 1122304, 16777216, 67108864, -1073741824, 0, 1024, 4096, -1073741824, 16777218, 16777218,
  1090519040, 18878464, 287309824, -1795162110, 83886082, 352321538, 18874368, 83886082, 83886082, 287309824, 128,
  352321538, 83886082, 354418690, 1426063362, 352321538, 352321538, 128, 256, 256, 512, 4096, 0, 2048, 8192,
  -2147483648, 192, 8388736, 8388736, 9437312, 13631616, 13649319, 13648292, 13649319, 13649319, 16777344, 285212800,
  -1056964480, -2130706304, 16777344, 16777408, -2130706304, 1073749632, 1090526912, 1090526912, -1056956736,
  1090526914, 1090526912, 352321666, 1157635778, 3584, 0, 4096, 4096, 16384, 3072, 0, 2560, 32, 524288, 0, 49152, 4224,
  4224, 4288, 4288, 4194304, 8388608, 16777216, 0, 15, 416, 1024, 0, 16, 16, 32, -2147483648, 1024, 134217728, 0, 20, 0,
  32, 0, 55, 1, 268468224, 8, 8, 10, 8, 12, 0, 524288, 2097152, 8388608, 33554432, 512, 32768, 393216, 0, 655360,
  917504, 0, 786432, 0, 1048576, 8192, 2048, 32768, 65536, -2147352576, 262152, 524296, 8, 16, 96, 1024, 6144, 0,
  2097152, 2097152, 4194304, 0, 4288, 0, 5184, 0, 6672, 134217736, 8, 24, 8, 32, 4, 32, 32, 48, 65544, 8, 64, 192, 192,
  64, 128, 1024, 4160, 0, 32768, 16, 48, 48, 52, 1, 5, 5, 268468224, 10, 26, 280, -2147483624, 524552, 264, 8, 2048,
  524288, 4194304, -2147483648, 786440, 262152, 8, 4096, 524288, 8388608, 67108864, 268435456, 0, 111360, 280, 24, 40,
  280, 8, 6160, 0, 2097664, 134217728, 128, 3072, 290816, -1006632960, 0, 4194304, 16777216, 1073741824, 0, 6291456, 0,
  8388608, 8388608, 0, 7, 0, 8, 1, 1, 2, 4, 8, 0, -2147483648, 0, -1879048192, 0, 0, 1, 0, 2, 0, 3, 4, 0, 4, 4, 16, 0,
  6, 82837504, 264, 264, 131080, 264, 524296, 524568, 524568, 0, 8388736, 939524608, 2064671658, 2064671658, 8, 12288,
  262144, 0, 8912896, 8916992, 8, 2065170712, 10, 56, 2064671658, 2065171352, 2064671658, 2065171384, 2065171384,
  -82312264, 2065171384, 2065195960, 2065195960, 2065195962, 2065327032, 0, 2065195962, -82050086, 2065195962,
  2065327034, -82050088, 58, 70256642, 70260746, 70285966, 70285966, 70285982, -2077197682, 70285966, -2077197666,
  2065195962, 2065195962, 0, 9437184, 2065327034, 2134383514, 4, 1024, 16384, 13631488, 0, 16777216, 1610612736, 0,
  16777218, 2097152, 0, 64, 0, 96, 128, 0, 128, 128, 192, 0, 256, 0, 384, 1536, 16384, 512, 0, 432, 4096, 119537664, 32,
  131072, 0, 33554432, 3072, 2048, 12288, -1073741824, 131072, 4194304, 134217728, 268435456, -2147483648, 1024,
  272629760, 16, 4096, 1048576, 1048704, 2048, 917504, 2097152, 67108864, 0, 8192, 0, 12288, 0, 16384, 1056768,
  33554432, 272629760, 138412032, 134217728, 138412032, 536870916, 138412032, 138414080, -2007889904, -2008938480,
  786952, 786952, -2008151552, -2008151552, 34341384, -2008937968, -2008151552, -2008937968, -2008937968, -1760771576,
  -2008937968, -2008413680, -2008413680, -2008151536, -2008151536, -932312192, -2008151528, -2008151528, -2008933808,
  -2008151528, -923915392, -923915392, -923915390, -923915390, -923915368, -923915374, 131072, 1048576, 25165824,
  67108864, 33554432, 67108864, 83886080, 134217728, 138412032, 0, 34340864, 4, 536870912, 0, 39845888, 139067392,
  139329536, -2147483648, 141426688, -1073741824, 6720, 0, 50331648, 11136, 149815296, 138412032, 4, 64, 1024, 20480,
  30408704, -1006632960, 1179648, -2147483648, 146800640, 0, 67108864, 146800640, -1073741824, 8192, 8388608,
  1073741824, 0, 536870912, 1, 32, 256, 1536, 1048576, 8388608, 285212672, 1090519040, -2130706432, 16777216, 16777216,
  16777472, 7680, 384, 2048, 4194304, 8192, 4194304, 32768, 16777216, 32768, 67108864, 4096, 536870912, 1073741824,
  -2147483648, 65536, 4194304, 65536, 536870912, 8913408, 1090519048, 8913408, 8913412, 8917764, 8917764, 111719188,
  44577540, 111719188, 111719188, 515831799, 515831799, 102803472, 102801424, 111719188, 648655636, 103850000, 44577540,
  111686420, 111686420, 103850000, 111719188, 380564279, 111719188, 4, 4864, 45824, 524288, 16777216, 40960, 35651584,
  13056, 44040192, 67108864, 45824, 67108864, 62208, 917504, 4194304, 536870912, -2147483648, 603979776, 0, 69206016,
  119, 63360, 1966080, 469762048, 0, 81788928, 1966080, 44040192, 335544320, 4, 256, 2048, 33554432, 16384, 50331648,
  67108864, 1073741824, 8, 16777216, 7, 32, 512, 2097152, 134217728, 1024, 1048576, 32, 393216, 1048576, 536870912, 7,
  96, 1024, 393216, 8388608, 4, 262144, 1024, 262144, 2, 262144, 2, 64, 32768, 917504, 138412032, -1073741824, 128,
  65536, 2048, 536870912, 32768, 33554432, 16385, 33558528, 8388736, 4216103, 13649319, 4212007, 4214055, 6309159,
  13648292, 13649316, 13649316, 39867687, 13649318, -976200281, 13649319, 13649335, -975929937, -975929937, 65536,
  131072, 262144, 1048576, 1048576, 0, 65536, 0, 98304, 512, 939524096, 7, 288, 4, 416, 3072, 512, 134217728, 805306368,
  0, 117440512, 3, 1024, 32768, 524288, 3, 8, 40400, 10289152, 50331648, 4096, 2097152, 2, 2048, 1073741824, 2, 8,
  2097664, 2, 8388608, 4096, 25165824, 12288, 25165824, 4096, 16777216, 4096, 33554432, 16777472, 16777728, 2, 12288,
  16777216, 0, 536870914, 0, 118226944, 536870914, 4202496, 0, 1073743880, 0, 134217728, 1073741824, 1073743880,
  1073743880, 1073747992, 1073747992, 1091311640, 1073747992, 17563648, 1091311640, 1090787352, 1091311640, 1091311640,
  1093409304, 285999104, 17563680, 1074010136, 1091311640, 151781376, 1074010136, 1090787352, 151781376, 1090787352,
  1193024792, 1091311640, 1095514136, 1201511900, 1201511900, 786432, 16777216, 7440, 1835008, 2883584, 0, 138543104,
  14352, 4980736, 6144, 524288, 16, 256, 4096, 32768, 131072, -1879048192, 1572864, 50331648, 14336, 0, 139591680, 4,
  192, 256, 1572864, 8388608, 131072, 536870912, 192, 32768, 4194304, 1073741824, 65536, 8388608, 2, 8192, 8192, 524288,
  524288, -2147483648, 16, 192, 4224, 0, 43008, 16, 2048, 192, 8388608, 16, 33554432, 33554432, 128, 512, 16384, 32768,
  0, 2944, 128, 8388608, 76, 76, 0, 268435456, 536870912, 1, 48, 52, 52, 48, 33, 5, 1, 53, 49
);

(:~
 : The token-string table.
 :)
declare variable $p:TOKEN as xs:string+ :=
(
  "EPSILON",
  "EOF",
  "PragmaContents",
  "DirCommentContents",
  "DirPIContents",
  "CDataSectionContents",
  "Wildcard",
  "EQName",
  "URILiteral",
  "IntegerLiteral",
  "DecimalLiteral",
  "DoubleLiteral",
  "StringLiteral",
  "PredefinedEntityRef",
  "'""""'",
  "EscapeApos",
  "ElementContentChar",
  "QuotAttrContentChar",
  "AposAttrContentChar",
  "PITarget",
  "CharRef",
  "NCName",
  "QName",
  "S",
  "S",
  "CommentContents",
  "'!='",
  "'""'",
  "'#'",
  "'#)'",
  "'$'",
  "'%'",
  "''''",
  "'('",
  "'(#'",
  "'(:'",
  "')'",
  "'*'",
  "'*'",
  "'+'",
  "','",
  "'-'",
  "'-->'",
  "'.'",
  "'..'",
  "'/'",
  "'//'",
  "'/>'",
  "':)'",
  "'::'",
  "':='",
  "';'",
  "'<'",
  "'<!--'",
  "'<![CDATA['",
  "'</'",
  "'<<'",
  "'<='",
  "'<?'",
  "'='",
  "'>'",
  "'>='",
  "'>>'",
  "'?'",
  "'?>'",
  "'@'",
  "'NaN'",
  "'['",
  "']'",
  "']]>'",
  "'allowing'",
  "'ancestor'",
  "'ancestor-or-self'",
  "'and'",
  "'as'",
  "'ascending'",
  "'at'",
  "'attribute'",
  "'base-uri'",
  "'boundary-space'",
  "'by'",
  "'case'",
  "'cast'",
  "'castable'",
  "'catch'",
  "'child'",
  "'collation'",
  "'comment'",
  "'construction'",
  "'context'",
  "'copy-namespaces'",
  "'count'",
  "'decimal-format'",
  "'decimal-separator'",
  "'declare'",
  "'default'",
  "'descendant'",
  "'descendant-or-self'",
  "'descending'",
  "'digit'",
  "'div'",
  "'document'",
  "'document-node'",
  "'element'",
  "'else'",
  "'empty'",
  "'empty-sequence'",
  "'encoding'",
  "'end'",
  "'eq'",
  "'every'",
  "'except'",
  "'external'",
  "'following'",
  "'following-sibling'",
  "'for'",
  "'function'",
  "'ge'",
  "'greatest'",
  "'group'",
  "'grouping-separator'",
  "'gt'",
  "'idiv'",
  "'if'",
  "'import'",
  "'in'",
  "'infinity'",
  "'inherit'",
  "'instance'",
  "'intersect'",
  "'is'",
  "'item'",
  "'lax'",
  "'le'",
  "'least'",
  "'let'",
  "'lt'",
  "'minus-sign'",
  "'mod'",
  "'module'",
  "'namespace'",
  "'namespace-node'",
  "'ne'",
  "'next'",
  "'no-inherit'",
  "'no-preserve'",
  "'node'",
  "'of'",
  "'only'",
  "'option'",
  "'or'",
  "'order'",
  "'ordered'",
  "'ordering'",
  "'parent'",
  "'pattern-separator'",
  "'per-mille'",
  "'percent'",
  "'preceding'",
  "'preceding-sibling'",
  "'preserve'",
  "'previous'",
  "'processing-instruction'",
  "'return'",
  "'satisfies'",
  "'schema'",
  "'schema-attribute'",
  "'schema-element'",
  "'self'",
  "'sliding'",
  "'some'",
  "'stable'",
  "'start'",
  "'strict'",
  "'strip'",
  "'switch'",
  "'text'",
  "'then'",
  "'to'",
  "'treat'",
  "'try'",
  "'tumbling'",
  "'type'",
  "'typeswitch'",
  "'union'",
  "'unordered'",
  "'validate'",
  "'variable'",
  "'version'",
  "'when'",
  "'where'",
  "'window'",
  "'xquery'",
  "'zero-digit'",
  "'{'",
  "'{{'",
  "'|'",
  "'}'",
  "'}}'"
);

(:~
 : Match next token in input string, starting at given index, using
 : the DFA entry state for the set of tokens that are expected in
 : the current context.
 :
 : @param $input the input string.
 : @param $begin the index where to start in input string.
 : @param $token-set the expected token set id.
 : @return a sequence of three: the token code of the result token,
 : with input string begin and end positions. If there is no valid
 : token, return the negative id of the DFA state that failed, along
 : with begin and end positions of the longest viable prefix.
 :)
declare function p:match($input as xs:string,
                         $begin as xs:integer,
                         $token-set as xs:integer) as xs:integer+
{
  let $result := $p:INITIAL[1 + $token-set]
  return p:transition($input,
                      $begin,
                      $begin,
                      $begin,
                      $result,
                      $result mod 2048,
                      0)
};

(:~
 : The DFA state transition function. If we are in a valid DFA state, save
 : it's result annotation, consume one input codepoint, calculate the next
 : state, and use tail recursion to do the same again. Otherwise, return
 : any valid result or a negative DFA state id in case of an error.
 :
 : @param $input the input string.
 : @param $begin the begin index of the current token in the input string.
 : @param $current the index of the current position in the input string.
 : @param $end the end index of the result in the input string.
 : @param $result the result code.
 : @param $current-state the current DFA state.
 : @param $previous-state the  previous DFA state.
 : @return a sequence of three: the token code of the result token,
 : with input string begin and end positions. If there is no valid
 : token, return the negative id of the DFA state that failed, along
 : with begin and end positions of the longest viable prefix.
 :)
declare function p:transition($input as xs:string,
                              $begin as xs:integer,
                              $current as xs:integer,
                              $end as xs:integer,
                              $result as xs:integer,
                              $current-state as xs:integer,
                              $previous-state as xs:integer) as xs:integer+
{
  if ($current-state = 0) then
    let $result := $result idiv 2048
    return
      if ($result != 0) then
      (
        $result mod 256 - 1,
        $begin,
        $end - $result idiv 256
      )
      else
      (
        - $previous-state,
        $begin,
        $current - 1
      )
  else
    let $c0 := (string-to-codepoints(substring($input, $current, 1)), 0)[1]
    let $c1 :=
      if ($c0 < 128) then
        $p:MAP0[1 + $c0]
      else if ($c0 < 55296) then
        let $c1 := $c0 idiv 16
        let $c2 := $c1 idiv 32
        return $p:MAP1[1 + $c0 mod 16 + $p:MAP1[1 + $c1 mod 32 + $p:MAP1[1 + $c2]]]
      else
        p:map2($c0, 1, 6)
    let $current := $current + 1
    let $i0 := 2048 * $c1 + $current-state - 1
    let $i1 := $i0 idiv 16
    let $next-state := $p:TRANSITION[$i0 mod 16 + $p:TRANSITION[$i1 + 1] + 1]
    return
      if ($next-state > 2047) then
        p:transition($input, $begin, $current, $current, $next-state, $next-state mod 2048, $current-state)
      else
        p:transition($input, $begin, $current, $end, $result, $next-state, $current-state)
};

(:~
 : Recursively translate one 32-bit chunk of an expected token bitset
 : to the corresponding sequence of token strings.
 :
 : @param $result the result of previous recursion levels.
 : @param $chunk the 32-bit chunk of the expected token bitset.
 : @param $base-token-code the token code of bit 0 in the current chunk.
 : @return the set of token strings.
 :)
declare function p:token($result as xs:string*,
                         $chunk as xs:integer,
                         $base-token-code as xs:integer) as xs:string*
{
  if ($chunk = 0) then
    $result
  else
    p:token
    (
      ($result, if ($chunk mod 2 != 0) then $p:TOKEN[$base-token-code] else ()),
      if ($chunk < 0) then $chunk idiv 2 + 2147483648 else $chunk idiv 2,
      $base-token-code + 1
    )
};

(:~
 : Calculate expected token set for a given DFA state as a sequence
 : of strings.
 :
 : @param $state the DFA state.
 : @return the set of token strings
 :)
declare function p:expected-token-set($state as xs:integer) as xs:string*
{
  if ($state > 0) then
    for $t in 0 to 6
    let $i0 := $t * 1818 + $state - 1
    let $i1 := $i0 idiv 2
    let $i2 := $i1 idiv 4
    let $i3 := $i2 idiv 8
    return p:token((), $p:EXPECTED[$i0 mod 2 + $p:EXPECTED[$i1 mod 4 + $p:EXPECTED[$i2 mod 8 + $p:EXPECTED[$i3 + 1] + 1] + 1] + 1], $t * 32 + 1)
  else
    ()
};

(:~
 : Classify codepoint by doing a tail recursive binary search for a
 : matching codepoint range entry in MAP2, the codepoint to charclass
 : map for codepoints above the surrogate block.
 :
 : @param $c the codepoint.
 : @param $lo the binary search lower bound map index.
 : @param $hi the binary search upper bound map index.
 : @return the character class.
 :)
declare function p:map2($c as xs:integer, $lo as xs:integer, $hi as xs:integer) as xs:integer
{
  if ($lo > $hi) then
    0
  else
    let $m := ($hi + $lo) idiv 2
    return
      if ($p:MAP2[$m] > $c) then
        p:map2($c, $lo, $m - 1)
      else if ($p:MAP2[6 + $m] < $c) then
        p:map2($c, $m + 1, $hi)
      else
        $p:MAP2[12 + $m]
};

(:~
 : The index of the parser state for accessing the combined
 : (i.e. level > 1) lookahead code.
 :)
declare variable $p:lk := 1;

(:~
 : The index of the parser state for accessing the position in the
 : input string of the begin of the token that has been shifted.
 :)
declare variable $p:b0 := 2;

(:~
 : The index of the parser state for accessing the position in the
 : input string of the end of the token that has been shifted.
 :)
declare variable $p:e0 := 3;

(:~
 : The index of the parser state for accessing the code of the
 : level-1-lookahead token.
 :)
declare variable $p:l1 := 4;

(:~
 : The index of the parser state for accessing the position in the
 : input string of the begin of the level-1-lookahead token.
 :)
declare variable $p:b1 := 5;

(:~
 : The index of the parser state for accessing the position in the
 : input string of the end of the level-1-lookahead token.
 :)
declare variable $p:e1 := 6;

(:~
 : The index of the parser state for accessing the code of the
 : level-2-lookahead token.
 :)
declare variable $p:l2 := 7;

(:~
 : The index of the parser state for accessing the position in the
 : input string of the begin of the level-2-lookahead token.
 :)
declare variable $p:b2 := 8;

(:~
 : The index of the parser state for accessing the position in the
 : input string of the end of the level-2-lookahead token.
 :)
declare variable $p:e2 := 9;

(:~
 : The index of the parser state for accessing the code of the
 : level-3-lookahead token.
 :)
declare variable $p:l3 := 10;

(:~
 : The index of the parser state for accessing the position in the
 : input string of the begin of the level-3-lookahead token.
 :)
declare variable $p:b3 := 11;

(:~
 : The index of the parser state for accessing the position in the
 : input string of the end of the level-3-lookahead token.
 :)
declare variable $p:e3 := 12;

(:~
 : The index of the parser state for accessing the token code that
 : was expected when an error was found.
 :)
declare variable $p:error := 13;

(:~
 : The index of the parser state that points to the first entry
 : used for collecting action results.
 :)
declare variable $p:result := 14;

(:~
 : Create a textual error message from a parsing error.
 :
 : @param $input the input string.
 : @param $error the parsing error descriptor.
 : @return the error message.
 :)
declare function p:error-message($input as xs:string, $error as element(error)) as xs:string
{
  let $begin := xs:integer($error/@b)
  let $context := string-to-codepoints(substring($input, 1, $begin - 1))
  let $linefeeds := index-of($context, 10)
  let $line := count($linefeeds) + 1
  let $column := ($begin - $linefeeds[last()], $begin)[1]
  return
    if ($error/@o) then
      concat
      (
        "syntax error, found ", $p:TOKEN[$error/@o + 1], "&#10;",
        "while expecting ", $p:TOKEN[$error/@x + 1], "&#10;",
        "after scanning ", string($error/@e - $begin), " characters at line ",
        string($line), ", column ", string($column), "&#10;",
        "...", substring($input, $begin, 32), "..."
      )
    else
      let $expected := p:expected-token-set($error/@s)
      return
        concat
        (
          "lexical analysis failed&#10;",
          "while expecting ",
          "["[exists($expected[2])],
          string-join($expected, ", "),
          "]"[exists($expected[2])],
          "&#10;",
          "after scanning ", string($error/@e - $begin), " characters at line ",
          string($line), ", column ", string($column), "&#10;",
          "...", substring($input, $begin, 32), "..."
        )
};

(:~
 : Shift one token, i.e. compare lookahead token 1 with expected
 : token and in case of a match, shift lookahead tokens down such that
 : l1 becomes the current token, and higher lookahead tokens move down.
 : When lookahead token 1 does not match the expected token, raise an
 : error by saving the expected token code in the error field of the
 : parser state.
 :
 : @param $code the expected token.
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:shift($code as xs:integer, $input as xs:string, $state as item()+) as item()+
{
  if ($state[$p:error]) then
    $state
  else if ($state[$p:l1] = $code) then
  (
    subsequence($state, $p:l1, $p:e3 - $p:l1 + 1),
    0,
    $state[$p:e3],
    subsequence($state, $p:e3),
    if ($state[$p:e0] != $state[$p:b1]) then
      text {substring($input, $state[$p:e0], $state[$p:b1] - $state[$p:e0])}
    else
      (),
    let $name := $p:TOKEN[1 + $state[$p:l1]]
    let $content := substring($input, $state[$p:b1], $state[$p:e1] - $state[$p:b1])
    return
      if (starts-with($name, "'")) then
        element TOKEN {$content}
      else
        element {$name} {$content}
  )
  else
  (
    subsequence($state, 1, $p:error - 1),
    element error
    {
      attribute b {$state[$p:b1]},
      attribute e {$state[$p:e1]},
      if ($state[$p:l1] < 0) then
        attribute s {- $state[$p:l1]}
      else
        (attribute o {$state[$p:l1]}, attribute x {$code})
    },
    subsequence($state, $p:error + 1)
  )
};

(:~
 : Use p:match to fetch the next token, but skip any leading
 : whitespace.
 :
 : @param $input the input string.
 : @param $begin the index where to start.
 : @param $token-set the valid token set id.
 : @return a sequence of three values: the token code of the result
 : token, with input string positions of token begin and end.
 :)
declare function p:matchW($input as xs:string,
                          $begin as xs:integer,
                          $token-set as xs:integer) as xs:integer+
{
  let $match := p:match($input, $begin, $token-set)
  return
    if ($match[1] = 24) then                                (: S^WS :)
      p:matchW($input, $match[3], $token-set)
    else if ($match[1] = 35) then                           (: ('(' ':') :)
      let $state := p:parse-Whitespace($input, (0, 0, 0, $match, 0, $match[3], 0, 0, 0, 0, false()))
      return p:matchW($input, $state[$p:e0], $token-set)
    else
      $match
};

(:~
 : Lookahead one token on level 1 with whitespace skipping.
 :
 : @param $set the code of the DFA entry state for the set of valid tokens.
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:lookahead1W($set as xs:integer, $input as xs:string, $state as item()+) as item()+
{
  if ($state[$p:l1] != 0) then
    $state
  else
    let $match := p:matchW($input, $state[$p:b1], $set)
    return
    (
      $match[1],
      subsequence($state, $p:lk + 1, $p:l1 - $p:lk - 1),
      $match,
      0, $match[3], 0,
      subsequence($state, $p:e2 + 1)
    )
};

(:~
 : Lookahead one token on level 2 with whitespace skipping.
 :
 : @param $set the code of the DFA entry state for the set of valid tokens.
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:lookahead2W($set as xs:integer, $input as xs:string, $state as item()+) as item()+
{
  let $match :=
    if ($state[$p:l2] != 0) then
      subsequence($state, $p:l2, $p:e2 - $p:l2 + 1)
    else
      p:matchW($input, $state[$p:b2], $set)
  return
  (
    $match[1] * 256 + $state[$p:l1],
    subsequence($state, $p:lk + 1, $p:l2 - $p:lk - 1),
    $match,
    0, $match[3], 0,
    subsequence($state, $p:e3 + 1)
  )
};

(:~
 : Lookahead one token on level 3 with whitespace skipping.
 :
 : @param $set the code of the DFA entry state for the set of valid tokens.
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:lookahead3W($set as xs:integer, $input as xs:string, $state as item()+) as item()+
{
  let $match :=
    if ($state[$p:l3] != 0) then
      subsequence($state, $p:l3, $p:e3 - $p:l3 + 1)
    else
      p:matchW($input, $state[$p:b3], $set)
  return
  (
    $match[1] * 65536 + $state[$p:lk],
    subsequence($state, $p:lk + 1, $p:l3 - $p:lk - 1),
    $match,
    subsequence($state, $p:e3 + 1)
  )
};

(:~
 : Lookahead one token on level 1.
 :
 : @param $set the code of the DFA entry state for the set of valid tokens.
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:lookahead1($set as xs:integer, $input as xs:string, $state as item()+) as item()+
{
  if ($state[$p:l1] != 0) then
    $state
  else
    let $match := p:match($input, $state[$p:b1], $set)
    return
    (
      $match[1],
      subsequence($state, $p:lk + 1, $p:l1 - $p:lk - 1),
      $match,
      0, $match[3], 0,
      subsequence($state, $p:e2 + 1)
    )
};

(:~
 : Reduce the result stack. Pop $count element, wrap them in a
 : new element named $name, and push the new element.
 :
 : @param $state the parser state.
 : @param $name the name of the result node.
 : @param $count the number of child nodes.
 : @return the updated parser state.
 :)
declare function p:reduce($state as item()+, $name as xs:string, $count as xs:integer) as item()+
{
  subsequence($state, 1, $count),
  element {$name}
  {
    subsequence($state, $count + 1)
  }
};

(:~
 : Parse the 1st loop of production Comment (zero or more). Use
 : tail recursion for iteratively updating the parser state.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-Comment-1($input as xs:string, $state as item()+) as item()+
{
  if ($state[$p:error]) then
    $state
  else
    let $state := p:lookahead1(79, $input, $state)          (: CommentContents | ('(' ':') | (':' ')') :)
    return
      if ($state[$p:l1] = 48) then                          (: (':' ')') :)
        $state
      else
        let $state :=
          if ($state[$p:l1] = 25) then                      (: CommentContents :)
            let $state := p:shift(25, $input, $state)       (: CommentContents :)
            return $state
          else if ($state[$p:error]) then
            $state
          else
            let $state := p:parse-Comment($input, $state)
            return $state
        return p:parse-Comment-1($input, $state)
};

(:~
 : Parse Comment.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-Comment($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:shift(35, $input, $state)                 (: ('(' ':') :)
  let $state := p:parse-Comment-1($input, $state)
  let $state := p:shift(48, $input, $state)                 (: (':' ')') :)
  return p:reduce($state, "Comment", $count)
};

(:~
 : Parse Whitespace.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-Whitespace($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:lookahead1(25, $input, $state)            (: S^WS | ('(' ':') :)
  let $state :=
    if ($state[$p:l1] = 24) then                            (: S^WS :)
      let $state := p:shift(24, $input, $state)             (: S^WS :)
      return $state
    else if ($state[$p:error]) then
      $state
    else
      let $state := p:parse-Comment($input, $state)
      return $state
  return p:reduce($state, "Whitespace", $count)
};

(:~
 : Parse QueryBody.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-QueryBody($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:parse-Expr($input, $state)
  return p:reduce($state, "QueryBody", $count)
};

(:~
 : Parse MainModule.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-MainModule($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:parse-Prolog($input, $state)
  let $state := p:lookahead1W(31, $input, $state)           (: EPSILON | S^WS | ('(' ':') :)
  let $state := p:parse-QueryBody($input, $state)
  return p:reduce($state, "MainModule", $count)
};

(:~
 : Parse OptionDecl.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-OptionDecl($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:shift(94, $input, $state)                 (: 'declare' :)
  let $state := p:lookahead1W(69, $input, $state)           (: S^WS | ('(' ':') | 'option' :)
  let $state := p:shift(149, $input, $state)                (: 'option' :)
  let $state := p:lookahead1W(205, $input, $state)          (: EQName^Token | S^WS | ('(' ':') | 'ancestor' |
                                                               'ancestor-or-self' | 'and' | 'ascending' | 'attribute' |
                                                               'case' | 'cast' | 'castable' | 'child' | 'collation' |
                                                               'comment' | 'count' | 'declare' | 'default' |
                                                               'descendant' | 'descendant-or-self' | 'descending' |
                                                               'div' | 'document' | 'document-node' | 'element' |
                                                               'else' | 'empty' | 'empty-sequence' | 'end' | 'eq' |
                                                               'every' | 'except' | 'following' | 'following-sibling' |
                                                               'for' | 'function' | 'ge' | 'group' | 'gt' | 'idiv' |
                                                               'if' | 'import' | 'instance' | 'intersect' | 'is' |
                                                               'item' | 'le' | 'let' | 'lt' | 'mod' | 'module' |
                                                               'namespace' | 'namespace-node' | 'ne' | 'node' | 'only' |
                                                               'or' | 'order' | 'ordered' | 'parent' | 'preceding' |
                                                               'preceding-sibling' | 'processing-instruction' |
                                                               'return' | 'satisfies' | 'schema-attribute' |
                                                               'schema-element' | 'self' | 'some' | 'stable' | 'start' |
                                                               'switch' | 'text' | 'to' | 'treat' | 'try' |
                                                               'typeswitch' | 'union' | 'unordered' | 'validate' |
                                                               'where' | 'xquery' :)
  let $state := p:parse-EQName($input, $state)
  let $state := p:lookahead1W(35, $input, $state)           (: StringLiteral | S^WS | ('(' ':') :)
  let $state := p:shift(12, $input, $state)                 (: StringLiteral :)
  return p:reduce($state, "OptionDecl", $count)
};

(:~
 : Parse FunctionBody.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-FunctionBody($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:parse-EnclosedExpr($input, $state)
  return p:reduce($state, "FunctionBody", $count)
};

(:~
 : Parse FunctionDecl.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-FunctionDecl($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:shift(116, $input, $state)                (: 'function' :)
  let $state := p:lookahead1W(205, $input, $state)          (: EQName^Token | S^WS | ('(' ':') | 'ancestor' |
                                                               'ancestor-or-self' | 'and' | 'ascending' | 'attribute' |
                                                               'case' | 'cast' | 'castable' | 'child' | 'collation' |
                                                               'comment' | 'count' | 'declare' | 'default' |
                                                               'descendant' | 'descendant-or-self' | 'descending' |
                                                               'div' | 'document' | 'document-node' | 'element' |
                                                               'else' | 'empty' | 'empty-sequence' | 'end' | 'eq' |
                                                               'every' | 'except' | 'following' | 'following-sibling' |
                                                               'for' | 'function' | 'ge' | 'group' | 'gt' | 'idiv' |
                                                               'if' | 'import' | 'instance' | 'intersect' | 'is' |
                                                               'item' | 'le' | 'let' | 'lt' | 'mod' | 'module' |
                                                               'namespace' | 'namespace-node' | 'ne' | 'node' | 'only' |
                                                               'or' | 'order' | 'ordered' | 'parent' | 'preceding' |
                                                               'preceding-sibling' | 'processing-instruction' |
                                                               'return' | 'satisfies' | 'schema-attribute' |
                                                               'schema-element' | 'self' | 'some' | 'stable' | 'start' |
                                                               'switch' | 'text' | 'to' | 'treat' | 'try' |
                                                               'typeswitch' | 'union' | 'unordered' | 'validate' |
                                                               'where' | 'xquery' :)
  let $state := p:parse-EQName($input, $state)
  let $state := p:lookahead1W(40, $input, $state)           (: S^WS | '(' | ('(' ':') :)
  let $state := p:shift(33, $input, $state)                 (: '(' :)
  let $state := p:lookahead1W(86, $input, $state)           (: S^WS | '$' | ('(' ':') | ')' :)
  let $state :=
    if ($state[$p:error]) then
      $state
    else if ($state[$p:l1] = 30) then                       (: '$' :)
      let $state := p:parse-ParamList($input, $state)
      return $state
    else
      $state
  let $state := p:lookahead1W(41, $input, $state)           (: S^WS | ('(' ':') | ')' :)
  let $state := p:shift(36, $input, $state)                 (: ')' :)
  let $state := p:lookahead1W(133, $input, $state)          (: S^WS | ('(' ':') | 'as' | 'external' | '{' :)
  let $state :=
    if ($state[$p:error]) then
      $state
    else if ($state[$p:l1] = 74) then                       (: 'as' :)
      let $state := p:shift(74, $input, $state)             (: 'as' :)
      let $state := p:lookahead1W(31, $input, $state)       (: EPSILON | S^WS | ('(' ':') :)
      let $state := p:parse-SequenceType($input, $state)
      return $state
    else
      $state
  let $state := p:lookahead1W(111, $input, $state)          (: S^WS | ('(' ':') | 'external' | '{' :)
  let $state :=
    if ($state[$p:l1] = 194) then                           (: '{' :)
      let $state := p:parse-FunctionBody($input, $state)
      return $state
    else if ($state[$p:error]) then
      $state
    else
      let $state := p:shift(112, $input, $state)            (: 'external' :)
      return $state
  return p:reduce($state, "FunctionDecl", $count)
};

(:~
 : Parse VarDecl.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-VarDecl($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:shift(187, $input, $state)                (: 'variable' :)
  let $state := p:lookahead1W(39, $input, $state)           (: S^WS | '$' | ('(' ':') :)
  let $state := p:shift(30, $input, $state)                 (: '$' :)
  let $state := p:lookahead1W(205, $input, $state)          (: EQName^Token | S^WS | ('(' ':') | 'ancestor' |
                                                               'ancestor-or-self' | 'and' | 'ascending' | 'attribute' |
                                                               'case' | 'cast' | 'castable' | 'child' | 'collation' |
                                                               'comment' | 'count' | 'declare' | 'default' |
                                                               'descendant' | 'descendant-or-self' | 'descending' |
                                                               'div' | 'document' | 'document-node' | 'element' |
                                                               'else' | 'empty' | 'empty-sequence' | 'end' | 'eq' |
                                                               'every' | 'except' | 'following' | 'following-sibling' |
                                                               'for' | 'function' | 'ge' | 'group' | 'gt' | 'idiv' |
                                                               'if' | 'import' | 'instance' | 'intersect' | 'is' |
                                                               'item' | 'le' | 'let' | 'lt' | 'mod' | 'module' |
                                                               'namespace' | 'namespace-node' | 'ne' | 'node' | 'only' |
                                                               'or' | 'order' | 'ordered' | 'parent' | 'preceding' |
                                                               'preceding-sibling' | 'processing-instruction' |
                                                               'return' | 'satisfies' | 'schema-attribute' |
                                                               'schema-element' | 'self' | 'some' | 'stable' | 'start' |
                                                               'switch' | 'text' | 'to' | 'treat' | 'try' |
                                                               'typeswitch' | 'union' | 'unordered' | 'validate' |
                                                               'where' | 'xquery' :)
  let $state := p:parse-VarName($input, $state)
  let $state := p:lookahead1W(131, $input, $state)          (: S^WS | ('(' ':') | ':=' | 'as' | 'external' :)
  let $state :=
    if ($state[$p:error]) then
      $state
    else if ($state[$p:l1] = 74) then                       (: 'as' :)
      let $state := p:parse-TypeDeclaration($input, $state)
      return $state
    else
      $state
  let $state := p:lookahead1W(97, $input, $state)           (: S^WS | ('(' ':') | ':=' | 'external' :)
  let $state :=
    if ($state[$p:l1] = 50) then                            (: ':=' :)
      let $state := p:shift(50, $input, $state)             (: ':=' :)
      let $state := p:lookahead1W(31, $input, $state)       (: EPSILON | S^WS | ('(' ':') :)
      let $state := p:parse-VarValue($input, $state)
      return $state
    else if ($state[$p:error]) then
      $state
    else
      let $state := p:shift(112, $input, $state)            (: 'external' :)
      let $state := p:lookahead1W(95, $input, $state)       (: S^WS | ('(' ':') | ':=' | ';' :)
      let $state :=
        if ($state[$p:error]) then
          $state
        else if ($state[$p:l1] = 50) then                   (: ':=' :)
          let $state := p:shift(50, $input, $state)         (: ':=' :)
          let $state := p:lookahead1W(31, $input, $state)   (: EPSILON | S^WS | ('(' ':') :)
          let $state := p:parse-VarDefaultValue($input, $state)
          return $state
        else
          $state
      return $state
  return p:reduce($state, "VarDecl", $count)
};

(:~
 : Parse the 1st loop of production AnnotatedDecl (zero or more). Use
 : tail recursion for iteratively updating the parser state.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-AnnotatedDecl-1($input as xs:string, $state as item()+) as item()+
{
  if ($state[$p:error]) then
    $state
  else
    let $state := p:lookahead1W(128, $input, $state)        (: S^WS | '%' | ('(' ':') | 'function' | 'variable' :)
    return
      if ($state[$p:l1] != 31) then                         (: '%' :)
        $state
      else
        let $state := p:parse-Annotation($input, $state)
        return p:parse-AnnotatedDecl-1($input, $state)
};

(:~
 : Parse AnnotatedDecl.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-AnnotatedDecl($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:shift(94, $input, $state)                 (: 'declare' :)
  let $state := p:parse-AnnotatedDecl-1($input, $state)
  let $state :=
    if ($state[$p:l1] = 187) then                           (: 'variable' :)
      let $state := p:parse-VarDecl($input, $state)
      return $state
    else if ($state[$p:error]) then
      $state
    else
      let $state := p:parse-FunctionDecl($input, $state)
      return $state
  return p:reduce($state, "AnnotatedDecl", $count)
};

(:~
 : Parse VarDefaultValue.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-VarDefaultValue($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:parse-ExprSingle($input, $state)
  return p:reduce($state, "VarDefaultValue", $count)
};

(:~
 : Parse NodeComp.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-NodeComp($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state :=
    if ($state[$p:l1] = 130) then                           (: 'is' :)
      let $state := p:shift(130, $input, $state)            (: 'is' :)
      return $state
    else if ($state[$p:l1] = 56) then                       (: '<<' :)
      let $state := p:shift(56, $input, $state)             (: '<<' :)
      return $state
    else if ($state[$p:error]) then
      $state
    else
      let $state := p:shift(62, $input, $state)             (: '>>' :)
      return $state
  return p:reduce($state, "NodeComp", $count)
};

(:~
 : Parse GeneralComp.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-GeneralComp($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state :=
    if ($state[$p:l1] = 59) then                            (: '=' :)
      let $state := p:shift(59, $input, $state)             (: '=' :)
      return $state
    else if ($state[$p:l1] = 26) then                       (: '!=' :)
      let $state := p:shift(26, $input, $state)             (: '!=' :)
      return $state
    else if ($state[$p:l1] = 52) then                       (: '<' :)
      let $state := p:shift(52, $input, $state)             (: '<' :)
      return $state
    else if ($state[$p:l1] = 57) then                       (: '<=' :)
      let $state := p:shift(57, $input, $state)             (: '<=' :)
      return $state
    else if ($state[$p:l1] = 60) then                       (: '>' :)
      let $state := p:shift(60, $input, $state)             (: '>' :)
      return $state
    else if ($state[$p:error]) then
      $state
    else
      let $state := p:shift(61, $input, $state)             (: '>=' :)
      return $state
  return p:reduce($state, "GeneralComp", $count)
};

(:~
 : Parse ValueComp.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-ValueComp($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state :=
    if ($state[$p:l1] = 109) then                           (: 'eq' :)
      let $state := p:shift(109, $input, $state)            (: 'eq' :)
      return $state
    else if ($state[$p:l1] = 142) then                      (: 'ne' :)
      let $state := p:shift(142, $input, $state)            (: 'ne' :)
      return $state
    else if ($state[$p:l1] = 136) then                      (: 'lt' :)
      let $state := p:shift(136, $input, $state)            (: 'lt' :)
      return $state
    else if ($state[$p:l1] = 133) then                      (: 'le' :)
      let $state := p:shift(133, $input, $state)            (: 'le' :)
      return $state
    else if ($state[$p:l1] = 121) then                      (: 'gt' :)
      let $state := p:shift(121, $input, $state)            (: 'gt' :)
      return $state
    else if ($state[$p:error]) then
      $state
    else
      let $state := p:shift(117, $input, $state)            (: 'ge' :)
      return $state
  return p:reduce($state, "ValueComp", $count)
};

(:~
 : Parse SingleType.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-SingleType($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:lookahead1(202, $input, $state)           (: EQName^Token | 'ancestor' | 'ancestor-or-self' | 'and' |
                                                               'ascending' | 'attribute' | 'case' | 'cast' |
                                                               'castable' | 'child' | 'collation' | 'comment' |
                                                               'count' | 'declare' | 'default' | 'descendant' |
                                                               'descendant-or-self' | 'descending' | 'div' |
                                                               'document' | 'document-node' | 'element' | 'else' |
                                                               'empty' | 'empty-sequence' | 'end' | 'eq' | 'every' |
                                                               'except' | 'following' | 'following-sibling' | 'for' |
                                                               'function' | 'ge' | 'group' | 'gt' | 'idiv' | 'if' |
                                                               'import' | 'instance' | 'intersect' | 'is' | 'item' |
                                                               'le' | 'let' | 'lt' | 'mod' | 'module' | 'namespace' |
                                                               'namespace-node' | 'ne' | 'node' | 'only' | 'or' |
                                                               'order' | 'ordered' | 'parent' | 'preceding' |
                                                               'preceding-sibling' | 'processing-instruction' |
                                                               'return' | 'satisfies' | 'schema-attribute' |
                                                               'schema-element' | 'self' | 'some' | 'stable' | 'start' |
                                                               'switch' | 'text' | 'to' | 'treat' | 'try' |
                                                               'typeswitch' | 'union' | 'unordered' | 'validate' |
                                                               'where' | 'xquery' :)
  let $state := p:parse-AtomicOrUnionType($input, $state)
  let $state := p:lookahead1W(184, $input, $state)          (: EOF | S^WS | '!=' | ('(' ':') | ')' | '*' | '+' | ',' |
                                                               '-' | ';' | '<' | '<<' | '<=' | '=' | '>' | '>=' | '>>' |
                                                               '?' | ']' | 'and' | 'ascending' | 'case' | 'castable' |
                                                               'collation' | 'count' | 'default' | 'descending' |
                                                               'div' | 'else' | 'empty' | 'end' | 'eq' | 'except' |
                                                               'for' | 'ge' | 'group' | 'gt' | 'idiv' | 'instance' |
                                                               'intersect' | 'is' | 'le' | 'let' | 'lt' | 'mod' | 'ne' |
                                                               'only' | 'or' | 'order' | 'return' | 'satisfies' |
                                                               'stable' | 'start' | 'to' | 'treat' | 'union' | 'where' |
                                                               '|' | '}' :)
  let $state :=
    if ($state[$p:error]) then
      $state
    else if ($state[$p:l1] = 63) then                       (: '?' :)
      let $state := p:shift(63, $input, $state)             (: '?' :)
      return $state
    else
      $state
  return p:reduce($state, "SingleType", $count)
};

(:~
 : Parse Pragma.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-Pragma($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:lookahead1(9, $input, $state)             (: '(#' :)
  let $state := p:shift(34, $input, $state)                 (: '(#' :)
  let $state := p:lookahead1(204, $input, $state)           (: EQName^Token | S | 'ancestor' | 'ancestor-or-self' |
                                                               'and' | 'ascending' | 'attribute' | 'case' | 'cast' |
                                                               'castable' | 'child' | 'collation' | 'comment' |
                                                               'count' | 'declare' | 'default' | 'descendant' |
                                                               'descendant-or-self' | 'descending' | 'div' |
                                                               'document' | 'document-node' | 'element' | 'else' |
                                                               'empty' | 'empty-sequence' | 'end' | 'eq' | 'every' |
                                                               'except' | 'following' | 'following-sibling' | 'for' |
                                                               'function' | 'ge' | 'group' | 'gt' | 'idiv' | 'if' |
                                                               'import' | 'instance' | 'intersect' | 'is' | 'item' |
                                                               'le' | 'let' | 'lt' | 'mod' | 'module' | 'namespace' |
                                                               'namespace-node' | 'ne' | 'node' | 'only' | 'or' |
                                                               'order' | 'ordered' | 'parent' | 'preceding' |
                                                               'preceding-sibling' | 'processing-instruction' |
                                                               'return' | 'satisfies' | 'schema-attribute' |
                                                               'schema-element' | 'self' | 'some' | 'stable' | 'start' |
                                                               'switch' | 'text' | 'to' | 'treat' | 'try' |
                                                               'typeswitch' | 'union' | 'unordered' | 'validate' |
                                                               'where' | 'xquery' :)
  let $state :=
    if ($state[$p:error]) then
      $state
    else if ($state[$p:l1] = 23) then                       (: S :)
      let $state := p:shift(23, $input, $state)             (: S :)
      return $state
    else
      $state
  let $state := p:lookahead1(202, $input, $state)           (: EQName^Token | 'ancestor' | 'ancestor-or-self' | 'and' |
                                                               'ascending' | 'attribute' | 'case' | 'cast' |
                                                               'castable' | 'child' | 'collation' | 'comment' |
                                                               'count' | 'declare' | 'default' | 'descendant' |
                                                               'descendant-or-self' | 'descending' | 'div' |
                                                               'document' | 'document-node' | 'element' | 'else' |
                                                               'empty' | 'empty-sequence' | 'end' | 'eq' | 'every' |
                                                               'except' | 'following' | 'following-sibling' | 'for' |
                                                               'function' | 'ge' | 'group' | 'gt' | 'idiv' | 'if' |
                                                               'import' | 'instance' | 'intersect' | 'is' | 'item' |
                                                               'le' | 'let' | 'lt' | 'mod' | 'module' | 'namespace' |
                                                               'namespace-node' | 'ne' | 'node' | 'only' | 'or' |
                                                               'order' | 'ordered' | 'parent' | 'preceding' |
                                                               'preceding-sibling' | 'processing-instruction' |
                                                               'return' | 'satisfies' | 'schema-attribute' |
                                                               'schema-element' | 'self' | 'some' | 'stable' | 'start' |
                                                               'switch' | 'text' | 'to' | 'treat' | 'try' |
                                                               'typeswitch' | 'union' | 'unordered' | 'validate' |
                                                               'where' | 'xquery' :)
  let $state := p:parse-EQName($input, $state)
  let $state := p:lookahead1(21, $input, $state)            (: S | '#)' :)
  let $state :=
    if ($state[$p:error]) then
      $state
    else if ($state[$p:l1] = 23) then                       (: S :)
      let $state := p:shift(23, $input, $state)             (: S :)
      let $state := p:lookahead1(0, $input, $state)         (: PragmaContents :)
      let $state := p:shift(2, $input, $state)              (: PragmaContents :)
      return $state
    else
      $state
  let $state := p:lookahead1(6, $input, $state)             (: '#)' :)
  let $state := p:shift(29, $input, $state)                 (: '#)' :)
  return p:reduce($state, "Pragma", $count)
};

(:~
 : Parse the 1st loop of production ExtensionExpr (one or more). Use
 : tail recursion for iteratively updating the parser state.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-ExtensionExpr-1($input as xs:string, $state as item()+) as item()+
{
  if ($state[$p:error]) then
    $state
  else
    let $state := p:parse-Pragma($input, $state)
    let $state := p:lookahead1W(90, $input, $state)         (: S^WS | '(#' | ('(' ':') | '{' :)
    return
      if ($state[$p:l1] != 34) then                         (: '(#' :)
        $state
      else
        p:parse-ExtensionExpr-1($input, $state)
};

(:~
 : Parse ExtensionExpr.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-ExtensionExpr($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:parse-ExtensionExpr-1($input, $state)
  let $state := p:shift(194, $input, $state)                (: '{' :)
  let $state := p:lookahead1W(221, $input, $state)          (: Wildcard | EQName^Token | IntegerLiteral |
                                                               DecimalLiteral | DoubleLiteral | StringLiteral | S^WS |
                                                               '$' | '(' | '(#' | ('(' ':') | '+' | '-' | '.' | '..' |
                                                               '/' | '//' | '<' | '<!--' | '<?' | '@' | 'ancestor' |
                                                               'ancestor-or-self' | 'and' | 'ascending' | 'attribute' |
                                                               'case' | 'cast' | 'castable' | 'child' | 'collation' |
                                                               'comment' | 'count' | 'declare' | 'default' |
                                                               'descendant' | 'descendant-or-self' | 'descending' |
                                                               'div' | 'document' | 'document-node' | 'element' |
                                                               'else' | 'empty' | 'empty-sequence' | 'end' | 'eq' |
                                                               'every' | 'except' | 'following' | 'following-sibling' |
                                                               'for' | 'function' | 'ge' | 'group' | 'gt' | 'idiv' |
                                                               'if' | 'import' | 'instance' | 'intersect' | 'is' |
                                                               'item' | 'le' | 'let' | 'lt' | 'mod' | 'module' |
                                                               'namespace' | 'namespace-node' | 'ne' | 'node' | 'only' |
                                                               'or' | 'order' | 'ordered' | 'parent' | 'preceding' |
                                                               'preceding-sibling' | 'processing-instruction' |
                                                               'return' | 'satisfies' | 'schema-attribute' |
                                                               'schema-element' | 'self' | 'some' | 'stable' | 'start' |
                                                               'switch' | 'text' | 'to' | 'treat' | 'try' |
                                                               'typeswitch' | 'union' | 'unordered' | 'validate' |
                                                               'where' | 'xquery' | '}' :)
  let $state :=
    if ($state[$p:error]) then
      $state
    else if ($state[$p:l1] != 197) then                     (: '}' :)
      let $state := p:parse-Expr($input, $state)
      return $state
    else
      $state
  let $state := p:lookahead1W(78, $input, $state)           (: S^WS | ('(' ':') | '}' :)
  let $state := p:shift(197, $input, $state)                (: '}' :)
  return p:reduce($state, "ExtensionExpr", $count)
};

(:~
 : Parse the 1st loop of production PredicateList (zero or more). Use
 : tail recursion for iteratively updating the parser state.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-PredicateList-1($input as xs:string, $state as item()+) as item()+
{
  if ($state[$p:error]) then
    $state
  else
    let $state := p:lookahead1W(187, $input, $state)        (: EOF | S^WS | '!=' | ('(' ':') | ')' | '*' | '+' | ',' |
                                                               '-' | '/' | '//' | ';' | '<' | '<<' | '<=' | '=' | '>' |
                                                               '>=' | '>>' | '[' | ']' | 'and' | 'ascending' | 'case' |
                                                               'cast' | 'castable' | 'collation' | 'count' | 'default' |
                                                               'descending' | 'div' | 'else' | 'empty' | 'end' | 'eq' |
                                                               'except' | 'for' | 'ge' | 'group' | 'gt' | 'idiv' |
                                                               'instance' | 'intersect' | 'is' | 'le' | 'let' | 'lt' |
                                                               'mod' | 'ne' | 'only' | 'or' | 'order' | 'return' |
                                                               'satisfies' | 'stable' | 'start' | 'to' | 'treat' |
                                                               'union' | 'where' | '|' | '}' :)
    return
      if ($state[$p:l1] != 67) then                         (: '[' :)
        $state
      else
        let $state := p:parse-Predicate($input, $state)
        return p:parse-PredicateList-1($input, $state)
};

(:~
 : Parse PredicateList.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-PredicateList($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:parse-PredicateList-1($input, $state)
  return p:reduce($state, "PredicateList", $count)
};

(:~
 : Parse AbbrevForwardStep.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-AbbrevForwardStep($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state :=
    if ($state[$p:error]) then
      $state
    else if ($state[$p:l1] = 65) then                       (: '@' :)
      let $state := p:shift(65, $input, $state)             (: '@' :)
      return $state
    else
      $state
  let $state := p:lookahead1W(31, $input, $state)           (: EPSILON | S^WS | ('(' ':') :)
  let $state := p:parse-NodeTest($input, $state)
  return p:reduce($state, "AbbrevForwardStep", $count)
};

(:~
 : Parse ForwardAxis.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-ForwardAxis($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state :=
    if ($state[$p:l1] = 85) then                            (: 'child' :)
      let $state := p:shift(85, $input, $state)             (: 'child' :)
      let $state := p:lookahead1W(44, $input, $state)       (: S^WS | ('(' ':') | '::' :)
      let $state := p:shift(49, $input, $state)             (: '::' :)
      return $state
    else if ($state[$p:l1] = 96) then                       (: 'descendant' :)
      let $state := p:shift(96, $input, $state)             (: 'descendant' :)
      let $state := p:lookahead1W(44, $input, $state)       (: S^WS | ('(' ':') | '::' :)
      let $state := p:shift(49, $input, $state)             (: '::' :)
      return $state
    else if ($state[$p:l1] = 77) then                       (: 'attribute' :)
      let $state := p:shift(77, $input, $state)             (: 'attribute' :)
      let $state := p:lookahead1W(44, $input, $state)       (: S^WS | ('(' ':') | '::' :)
      let $state := p:shift(49, $input, $state)             (: '::' :)
      return $state
    else if ($state[$p:l1] = 168) then                      (: 'self' :)
      let $state := p:shift(168, $input, $state)            (: 'self' :)
      let $state := p:lookahead1W(44, $input, $state)       (: S^WS | ('(' ':') | '::' :)
      let $state := p:shift(49, $input, $state)             (: '::' :)
      return $state
    else if ($state[$p:l1] = 97) then                       (: 'descendant-or-self' :)
      let $state := p:shift(97, $input, $state)             (: 'descendant-or-self' :)
      let $state := p:lookahead1W(44, $input, $state)       (: S^WS | ('(' ':') | '::' :)
      let $state := p:shift(49, $input, $state)             (: '::' :)
      return $state
    else if ($state[$p:l1] = 114) then                      (: 'following-sibling' :)
      let $state := p:shift(114, $input, $state)            (: 'following-sibling' :)
      let $state := p:lookahead1W(44, $input, $state)       (: S^WS | ('(' ':') | '::' :)
      let $state := p:shift(49, $input, $state)             (: '::' :)
      return $state
    else if ($state[$p:error]) then
      $state
    else
      let $state := p:shift(113, $input, $state)            (: 'following' :)
      let $state := p:lookahead1W(44, $input, $state)       (: S^WS | ('(' ':') | '::' :)
      let $state := p:shift(49, $input, $state)             (: '::' :)
      return $state
  return p:reduce($state, "ForwardAxis", $count)
};

(:~
 : Parse ForwardStep.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-ForwardStep($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state :=
    if ($state[$p:l1] = 77) then                            (: 'attribute' :)
      let $state := p:lookahead2W(193, $input, $state)      (: EOF | S^WS | '!=' | '(' | ('(' ':') | ')' | '*' | '+' |
                                                               ',' | '-' | '/' | '//' | '::' | ';' | '<' | '<<' | '<=' |
                                                               '=' | '>' | '>=' | '>>' | '[' | ']' | 'and' |
                                                               'ascending' | 'case' | 'cast' | 'castable' |
                                                               'collation' | 'count' | 'default' | 'descending' |
                                                               'div' | 'else' | 'empty' | 'end' | 'eq' | 'except' |
                                                               'for' | 'ge' | 'group' | 'gt' | 'idiv' | 'instance' |
                                                               'intersect' | 'is' | 'le' | 'let' | 'lt' | 'mod' | 'ne' |
                                                               'only' | 'or' | 'order' | 'return' | 'satisfies' |
                                                               'stable' | 'start' | 'to' | 'treat' | 'union' | 'where' |
                                                               '|' | '}' :)
      return $state
    else if ($state[$p:l1] = 85                             (: 'descendant' :)
          or $state[$p:l1] = 96                             (: 'descendant-or-self' :)
          or $state[$p:l1] = 97                             (: 'following' :)
          or $state[$p:l1] = 113                            (: 'following-sibling' :)
          or $state[$p:l1] = 114                            (: 'self' :)
          or $state[$p:l1] = 168) then                      (: 'self' :)
      let $state := p:lookahead2W(190, $input, $state)      (: EOF | S^WS | '!=' | ('(' ':') | ')' | '*' | '+' | ',' |
                                                               '-' | '/' | '//' | '::' | ';' | '<' | '<<' | '<=' | '=' |
                                                               '>' | '>=' | '>>' | '[' | ']' | 'and' | 'ascending' |
                                                               'case' | 'cast' | 'castable' | 'collation' | 'count' |
                                                               'default' | 'descending' | 'div' | 'else' | 'empty' |
                                                               'end' | 'eq' | 'except' | 'for' | 'ge' | 'group' | 'gt' |
                                                               'idiv' | 'instance' | 'intersect' | 'is' | 'le' | 'let' |
                                                               'lt' | 'mod' | 'ne' | 'only' | 'or' | 'order' |
                                                               'return' | 'satisfies' | 'stable' | 'start' | 'to' |
                                                               'treat' | 'union' | 'where' | '|' | '}' :)
      return $state
    else
      ($state[$p:l1], subsequence($state, $p:lk + 1))
  let $state :=
    if ($state[$p:lk] = 12621                               (: 'attribute' '::' :)
     or $state[$p:lk] = 12629                               (: 'child' '::' :)
     or $state[$p:lk] = 12640                               (: 'descendant' '::' :)
     or $state[$p:lk] = 12641                               (: 'descendant-or-self' '::' :)
     or $state[$p:lk] = 12657                               (: 'following' '::' :)
     or $state[$p:lk] = 12658                               (: 'following-sibling' '::' :)
     or $state[$p:lk] = 12712) then                         (: 'self' '::' :)
      let $state := p:parse-ForwardAxis($input, $state)
      let $state := p:lookahead1W(31, $input, $state)       (: EPSILON | S^WS | ('(' ':') :)
      let $state := p:parse-NodeTest($input, $state)
      return $state
    else if ($state[$p:error]) then
      $state
    else
      let $state := p:parse-AbbrevForwardStep($input, $state)
      return $state
  return p:reduce($state, "ForwardStep", $count)
};

(:~
 : Parse AbbrevReverseStep.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-AbbrevReverseStep($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:shift(44, $input, $state)                 (: '..' :)
  return p:reduce($state, "AbbrevReverseStep", $count)
};

(:~
 : Parse NodeTest.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-NodeTest($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:lookahead1(203, $input, $state)           (: Wildcard | EQName^Token | 'ancestor' |
                                                               'ancestor-or-self' | 'and' | 'ascending' | 'attribute' |
                                                               'case' | 'cast' | 'castable' | 'child' | 'collation' |
                                                               'comment' | 'count' | 'declare' | 'default' |
                                                               'descendant' | 'descendant-or-self' | 'descending' |
                                                               'div' | 'document' | 'document-node' | 'element' |
                                                               'else' | 'empty' | 'empty-sequence' | 'end' | 'eq' |
                                                               'every' | 'except' | 'following' | 'following-sibling' |
                                                               'for' | 'function' | 'ge' | 'group' | 'gt' | 'idiv' |
                                                               'if' | 'import' | 'instance' | 'intersect' | 'is' |
                                                               'item' | 'le' | 'let' | 'lt' | 'mod' | 'module' |
                                                               'namespace' | 'namespace-node' | 'ne' | 'node' | 'only' |
                                                               'or' | 'order' | 'ordered' | 'parent' | 'preceding' |
                                                               'preceding-sibling' | 'processing-instruction' |
                                                               'return' | 'satisfies' | 'schema-attribute' |
                                                               'schema-element' | 'self' | 'some' | 'stable' | 'start' |
                                                               'switch' | 'text' | 'to' | 'treat' | 'try' |
                                                               'typeswitch' | 'union' | 'unordered' | 'validate' |
                                                               'where' | 'xquery' :)
  let $state :=
    if ($state[$p:l1] = 77                                  (: 'comment' :)
     or $state[$p:l1] = 87                                  (: 'document-node' :)
     or $state[$p:l1] = 102                                 (: 'element' :)
     or $state[$p:l1] = 103                                 (: 'namespace-node' :)
     or $state[$p:l1] = 141                                 (: 'node' :)
     or $state[$p:l1] = 146                                 (: 'processing-instruction' :)
     or $state[$p:l1] = 162                                 (: 'schema-attribute' :)
     or $state[$p:l1] = 166                                 (: 'schema-element' :)
     or $state[$p:l1] = 167                                 (: 'text' :)
     or $state[$p:l1] = 176) then                           (: 'text' :)
      let $state := p:lookahead2W(189, $input, $state)      (: EOF | S^WS | '!=' | '(' | ('(' ':') | ')' | '*' | '+' |
                                                               ',' | '-' | '/' | '//' | ';' | '<' | '<<' | '<=' | '=' |
                                                               '>' | '>=' | '>>' | '[' | ']' | 'and' | 'ascending' |
                                                               'case' | 'cast' | 'castable' | 'collation' | 'count' |
                                                               'default' | 'descending' | 'div' | 'else' | 'empty' |
                                                               'end' | 'eq' | 'except' | 'for' | 'ge' | 'group' | 'gt' |
                                                               'idiv' | 'instance' | 'intersect' | 'is' | 'le' | 'let' |
                                                               'lt' | 'mod' | 'ne' | 'only' | 'or' | 'order' |
                                                               'return' | 'satisfies' | 'stable' | 'start' | 'to' |
                                                               'treat' | 'union' | 'where' | '|' | '}' :)
      return $state
    else
      ($state[$p:l1], subsequence($state, $p:lk + 1))
  let $state :=
    if ($state[$p:lk] = 8525                                (: 'attribute' '(' :)
     or $state[$p:lk] = 8535                                (: 'comment' '(' :)
     or $state[$p:lk] = 8550                                (: 'document-node' '(' :)
     or $state[$p:lk] = 8551                                (: 'element' '(' :)
     or $state[$p:lk] = 8589                                (: 'namespace-node' '(' :)
     or $state[$p:lk] = 8594                                (: 'node' '(' :)
     or $state[$p:lk] = 8610                                (: 'processing-instruction' '(' :)
     or $state[$p:lk] = 8614                                (: 'schema-attribute' '(' :)
     or $state[$p:lk] = 8615                                (: 'schema-element' '(' :)
     or $state[$p:lk] = 8624) then                          (: 'text' '(' :)
      let $state := p:parse-KindTest($input, $state)
      return $state
    else if ($state[$p:error]) then
      $state
    else
      let $state := p:parse-NameTest($input, $state)
      return $state
  return p:reduce($state, "NodeTest", $count)
};

(:~
 : Parse ReverseAxis.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-ReverseAxis($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state :=
    if ($state[$p:l1] = 154) then                           (: 'parent' :)
      let $state := p:shift(154, $input, $state)            (: 'parent' :)
      let $state := p:lookahead1W(44, $input, $state)       (: S^WS | ('(' ':') | '::' :)
      let $state := p:shift(49, $input, $state)             (: '::' :)
      return $state
    else if ($state[$p:l1] = 71) then                       (: 'ancestor' :)
      let $state := p:shift(71, $input, $state)             (: 'ancestor' :)
      let $state := p:lookahead1W(44, $input, $state)       (: S^WS | ('(' ':') | '::' :)
      let $state := p:shift(49, $input, $state)             (: '::' :)
      return $state
    else if ($state[$p:l1] = 159) then                      (: 'preceding-sibling' :)
      let $state := p:shift(159, $input, $state)            (: 'preceding-sibling' :)
      let $state := p:lookahead1W(44, $input, $state)       (: S^WS | ('(' ':') | '::' :)
      let $state := p:shift(49, $input, $state)             (: '::' :)
      return $state
    else if ($state[$p:l1] = 158) then                      (: 'preceding' :)
      let $state := p:shift(158, $input, $state)            (: 'preceding' :)
      let $state := p:lookahead1W(44, $input, $state)       (: S^WS | ('(' ':') | '::' :)
      let $state := p:shift(49, $input, $state)             (: '::' :)
      return $state
    else if ($state[$p:error]) then
      $state
    else
      let $state := p:shift(72, $input, $state)             (: 'ancestor-or-self' :)
      let $state := p:lookahead1W(44, $input, $state)       (: S^WS | ('(' ':') | '::' :)
      let $state := p:shift(49, $input, $state)             (: '::' :)
      return $state
  return p:reduce($state, "ReverseAxis", $count)
};

(:~
 : Parse ReverseStep.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-ReverseStep($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state :=
    if ($state[$p:l1] = 44) then                            (: '..' :)
      let $state := p:parse-AbbrevReverseStep($input, $state)
      return $state
    else if ($state[$p:error]) then
      $state
    else
      let $state := p:parse-ReverseAxis($input, $state)
      let $state := p:lookahead1W(31, $input, $state)       (: EPSILON | S^WS | ('(' ':') :)
      let $state := p:parse-NodeTest($input, $state)
      return $state
  return p:reduce($state, "ReverseStep", $count)
};

(:~
 : Parse AxisStep.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-AxisStep($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state :=
    if ($state[$p:l1] = 71                                  (: 'ancestor-or-self' :)
     or $state[$p:l1] = 72                                  (: 'parent' :)
     or $state[$p:l1] = 154                                 (: 'preceding' :)
     or $state[$p:l1] = 158                                 (: 'preceding-sibling' :)
     or $state[$p:l1] = 159) then                           (: 'preceding-sibling' :)
      let $state := p:lookahead2W(190, $input, $state)      (: EOF | S^WS | '!=' | ('(' ':') | ')' | '*' | '+' | ',' |
                                                               '-' | '/' | '//' | '::' | ';' | '<' | '<<' | '<=' | '=' |
                                                               '>' | '>=' | '>>' | '[' | ']' | 'and' | 'ascending' |
                                                               'case' | 'cast' | 'castable' | 'collation' | 'count' |
                                                               'default' | 'descending' | 'div' | 'else' | 'empty' |
                                                               'end' | 'eq' | 'except' | 'for' | 'ge' | 'group' | 'gt' |
                                                               'idiv' | 'instance' | 'intersect' | 'is' | 'le' | 'let' |
                                                               'lt' | 'mod' | 'ne' | 'only' | 'or' | 'order' |
                                                               'return' | 'satisfies' | 'stable' | 'start' | 'to' |
                                                               'treat' | 'union' | 'where' | '|' | '}' :)
      return $state
    else
      ($state[$p:l1], subsequence($state, $p:lk + 1))
  let $state :=
    if ($state[$p:lk] = 44                                  (: '..' :)
     or $state[$p:lk] = 12615                               (: 'ancestor' '::' :)
     or $state[$p:lk] = 12616                               (: 'ancestor-or-self' '::' :)
     or $state[$p:lk] = 12698                               (: 'parent' '::' :)
     or $state[$p:lk] = 12702                               (: 'preceding' '::' :)
     or $state[$p:lk] = 12703) then                         (: 'preceding-sibling' '::' :)
      let $state := p:parse-ReverseStep($input, $state)
      return $state
    else if ($state[$p:error]) then
      $state
    else
      let $state := p:parse-ForwardStep($input, $state)
      return $state
  let $state := p:lookahead1W(31, $input, $state)           (: EPSILON | S^WS | ('(' ':') :)
  let $state := p:parse-PredicateList($input, $state)
  return p:reduce($state, "AxisStep", $count)
};

(:~
 : Parse Predicate.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-Predicate($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:shift(67, $input, $state)                 (: '[' :)
  let $state := p:lookahead1W(31, $input, $state)           (: EPSILON | S^WS | ('(' ':') :)
  let $state := p:parse-Expr($input, $state)
  let $state := p:lookahead1W(48, $input, $state)           (: S^WS | ('(' ':') | ']' :)
  let $state := p:shift(68, $input, $state)                 (: ']' :)
  return p:reduce($state, "Predicate", $count)
};

(:~
 : Parse Param.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-Param($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:lookahead1(7, $input, $state)             (: '$' :)
  let $state := p:shift(30, $input, $state)                 (: '$' :)
  let $state := p:lookahead1W(205, $input, $state)          (: EQName^Token | S^WS | ('(' ':') | 'ancestor' |
                                                               'ancestor-or-self' | 'and' | 'ascending' | 'attribute' |
                                                               'case' | 'cast' | 'castable' | 'child' | 'collation' |
                                                               'comment' | 'count' | 'declare' | 'default' |
                                                               'descendant' | 'descendant-or-self' | 'descending' |
                                                               'div' | 'document' | 'document-node' | 'element' |
                                                               'else' | 'empty' | 'empty-sequence' | 'end' | 'eq' |
                                                               'every' | 'except' | 'following' | 'following-sibling' |
                                                               'for' | 'function' | 'ge' | 'group' | 'gt' | 'idiv' |
                                                               'if' | 'import' | 'instance' | 'intersect' | 'is' |
                                                               'item' | 'le' | 'let' | 'lt' | 'mod' | 'module' |
                                                               'namespace' | 'namespace-node' | 'ne' | 'node' | 'only' |
                                                               'or' | 'order' | 'ordered' | 'parent' | 'preceding' |
                                                               'preceding-sibling' | 'processing-instruction' |
                                                               'return' | 'satisfies' | 'schema-attribute' |
                                                               'schema-element' | 'self' | 'some' | 'stable' | 'start' |
                                                               'switch' | 'text' | 'to' | 'treat' | 'try' |
                                                               'typeswitch' | 'union' | 'unordered' | 'validate' |
                                                               'where' | 'xquery' :)
  let $state := p:parse-EQName($input, $state)
  let $state := p:lookahead1W(129, $input, $state)          (: S^WS | ('(' ':') | ')' | ',' | 'as' :)
  let $state :=
    if ($state[$p:error]) then
      $state
    else if ($state[$p:l1] = 74) then                       (: 'as' :)
      let $state := p:parse-TypeDeclaration($input, $state)
      return $state
    else
      $state
  return p:reduce($state, "Param", $count)
};

(:~
 : Parse the 1st loop of production ParamList (zero or more). Use
 : tail recursion for iteratively updating the parser state.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-ParamList-1($input as xs:string, $state as item()+) as item()+
{
  if ($state[$p:error]) then
    $state
  else
    let $state := p:lookahead1W(91, $input, $state)         (: S^WS | ('(' ':') | ')' | ',' :)
    return
      if ($state[$p:l1] != 40) then                         (: ',' :)
        $state
      else
        let $state := p:shift(40, $input, $state)           (: ',' :)
        let $state := p:lookahead1W(31, $input, $state)     (: EPSILON | S^WS | ('(' ':') :)
        let $state := p:parse-Param($input, $state)
        return p:parse-ParamList-1($input, $state)
};

(:~
 : Parse ParamList.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-ParamList($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:parse-Param($input, $state)
  let $state := p:parse-ParamList-1($input, $state)
  return p:reduce($state, "ParamList", $count)
};

(:~
 : Parse InlineFunction.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-InlineFunction($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:shift(116, $input, $state)                (: 'function' :)
  let $state := p:lookahead1W(40, $input, $state)           (: S^WS | '(' | ('(' ':') :)
  let $state := p:shift(33, $input, $state)                 (: '(' :)
  let $state := p:lookahead1W(86, $input, $state)           (: S^WS | '$' | ('(' ':') | ')' :)
  let $state :=
    if ($state[$p:error]) then
      $state
    else if ($state[$p:l1] = 30) then                       (: '$' :)
      let $state := p:parse-ParamList($input, $state)
      return $state
    else
      $state
  let $state := p:lookahead1W(41, $input, $state)           (: S^WS | ('(' ':') | ')' :)
  let $state := p:shift(36, $input, $state)                 (: ')' :)
  let $state := p:lookahead1W(101, $input, $state)          (: S^WS | ('(' ':') | 'as' | '{' :)
  let $state :=
    if ($state[$p:error]) then
      $state
    else if ($state[$p:l1] = 74) then                       (: 'as' :)
      let $state := p:shift(74, $input, $state)             (: 'as' :)
      let $state := p:lookahead1W(31, $input, $state)       (: EPSILON | S^WS | ('(' ':') :)
      let $state := p:parse-SequenceType($input, $state)
      return $state
    else
      $state
  let $state := p:lookahead1W(31, $input, $state)           (: EPSILON | S^WS | ('(' ':') :)
  let $state := p:parse-EnclosedExpr($input, $state)
  return p:reduce($state, "InlineFunction", $count)
};

(:~
 : Parse LiteralFunctionItem.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-LiteralFunctionItem($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:parse-EQName($input, $state)
  let $state := p:lookahead1W(38, $input, $state)           (: S^WS | '#' | ('(' ':') :)
  let $state := p:shift(28, $input, $state)                 (: '#' :)
  let $state := p:lookahead1W(34, $input, $state)           (: IntegerLiteral | S^WS | ('(' ':') :)
  let $state := p:shift(9, $input, $state)                  (: IntegerLiteral :)
  return p:reduce($state, "LiteralFunctionItem", $count)
};

(:~
 : Parse FunctionItemExpr.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-FunctionItemExpr($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state :=
    if ($state[$p:l1] = 116) then                           (: 'function' :)
      let $state := p:lookahead2W(84, $input, $state)       (: S^WS | '#' | '(' | ('(' ':') :)
      return $state
    else
      ($state[$p:l1], subsequence($state, $p:lk + 1))
  let $state :=
    if ($state[$p:lk] = 8564) then                          (: 'function' '(' :)
      let $state := p:parse-InlineFunction($input, $state)
      return $state
    else if ($state[$p:error]) then
      $state
    else
      let $state := p:parse-LiteralFunctionItem($input, $state)
      return $state
  return p:reduce($state, "FunctionItemExpr", $count)
};

(:~
 : Parse CompPIConstructor.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-CompPIConstructor($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:shift(162, $input, $state)                (: 'processing-instruction' :)
  let $state := p:lookahead1W(169, $input, $state)          (: NCName^Token | S^WS | ('(' ':') | 'and' | 'ascending' |
                                                               'case' | 'cast' | 'castable' | 'collation' | 'count' |
                                                               'default' | 'descending' | 'div' | 'else' | 'empty' |
                                                               'end' | 'eq' | 'except' | 'for' | 'ge' | 'group' | 'gt' |
                                                               'idiv' | 'instance' | 'intersect' | 'is' | 'le' | 'let' |
                                                               'lt' | 'mod' | 'ne' | 'only' | 'or' | 'order' |
                                                               'return' | 'satisfies' | 'stable' | 'start' | 'to' |
                                                               'treat' | 'union' | 'where' | '{' :)
  let $state :=
    if ($state[$p:l1] = 194) then                           (: '{' :)
      let $state := p:shift(194, $input, $state)            (: '{' :)
      let $state := p:lookahead1W(31, $input, $state)       (: EPSILON | S^WS | ('(' ':') :)
      let $state := p:parse-Expr($input, $state)
      let $state := p:lookahead1W(78, $input, $state)       (: S^WS | ('(' ':') | '}' :)
      let $state := p:shift(197, $input, $state)            (: '}' :)
      return $state
    else if ($state[$p:error]) then
      $state
    else
      let $state := p:parse-NCName($input, $state)
      return $state
  let $state := p:lookahead1W(77, $input, $state)           (: S^WS | ('(' ':') | '{' :)
  let $state := p:shift(194, $input, $state)                (: '{' :)
  let $state := p:lookahead1W(221, $input, $state)          (: Wildcard | EQName^Token | IntegerLiteral |
                                                               DecimalLiteral | DoubleLiteral | StringLiteral | S^WS |
                                                               '$' | '(' | '(#' | ('(' ':') | '+' | '-' | '.' | '..' |
                                                               '/' | '//' | '<' | '<!--' | '<?' | '@' | 'ancestor' |
                                                               'ancestor-or-self' | 'and' | 'ascending' | 'attribute' |
                                                               'case' | 'cast' | 'castable' | 'child' | 'collation' |
                                                               'comment' | 'count' | 'declare' | 'default' |
                                                               'descendant' | 'descendant-or-self' | 'descending' |
                                                               'div' | 'document' | 'document-node' | 'element' |
                                                               'else' | 'empty' | 'empty-sequence' | 'end' | 'eq' |
                                                               'every' | 'except' | 'following' | 'following-sibling' |
                                                               'for' | 'function' | 'ge' | 'group' | 'gt' | 'idiv' |
                                                               'if' | 'import' | 'instance' | 'intersect' | 'is' |
                                                               'item' | 'le' | 'let' | 'lt' | 'mod' | 'module' |
                                                               'namespace' | 'namespace-node' | 'ne' | 'node' | 'only' |
                                                               'or' | 'order' | 'ordered' | 'parent' | 'preceding' |
                                                               'preceding-sibling' | 'processing-instruction' |
                                                               'return' | 'satisfies' | 'schema-attribute' |
                                                               'schema-element' | 'self' | 'some' | 'stable' | 'start' |
                                                               'switch' | 'text' | 'to' | 'treat' | 'try' |
                                                               'typeswitch' | 'union' | 'unordered' | 'validate' |
                                                               'where' | 'xquery' | '}' :)
  let $state :=
    if ($state[$p:error]) then
      $state
    else if ($state[$p:l1] != 197) then                     (: '}' :)
      let $state := p:parse-Expr($input, $state)
      return $state
    else
      $state
  let $state := p:lookahead1W(78, $input, $state)           (: S^WS | ('(' ':') | '}' :)
  let $state := p:shift(197, $input, $state)                (: '}' :)
  return p:reduce($state, "CompPIConstructor", $count)
};

(:~
 : Parse CompCommentConstructor.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-CompCommentConstructor($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:shift(87, $input, $state)                 (: 'comment' :)
  let $state := p:lookahead1W(77, $input, $state)           (: S^WS | ('(' ':') | '{' :)
  let $state := p:shift(194, $input, $state)                (: '{' :)
  let $state := p:lookahead1W(31, $input, $state)           (: EPSILON | S^WS | ('(' ':') :)
  let $state := p:parse-Expr($input, $state)
  let $state := p:lookahead1W(78, $input, $state)           (: S^WS | ('(' ':') | '}' :)
  let $state := p:shift(197, $input, $state)                (: '}' :)
  return p:reduce($state, "CompCommentConstructor", $count)
};

(:~
 : Parse CompTextConstructor.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-CompTextConstructor($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:shift(176, $input, $state)                (: 'text' :)
  let $state := p:lookahead1W(77, $input, $state)           (: S^WS | ('(' ':') | '{' :)
  let $state := p:shift(194, $input, $state)                (: '{' :)
  let $state := p:lookahead1W(31, $input, $state)           (: EPSILON | S^WS | ('(' ':') :)
  let $state := p:parse-Expr($input, $state)
  let $state := p:lookahead1W(78, $input, $state)           (: S^WS | ('(' ':') | '}' :)
  let $state := p:shift(197, $input, $state)                (: '}' :)
  return p:reduce($state, "CompTextConstructor", $count)
};

(:~
 : Parse URIExpr.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-URIExpr($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:parse-Expr($input, $state)
  return p:reduce($state, "URIExpr", $count)
};

(:~
 : Parse PrefixExpr.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-PrefixExpr($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:parse-Expr($input, $state)
  return p:reduce($state, "PrefixExpr", $count)
};

(:~
 : Parse Prefix.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-Prefix($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:parse-NCName($input, $state)
  return p:reduce($state, "Prefix", $count)
};

(:~
 : Parse CompNamespaceConstructor.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-CompNamespaceConstructor($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:shift(140, $input, $state)                (: 'namespace' :)
  let $state := p:lookahead1W(169, $input, $state)          (: NCName^Token | S^WS | ('(' ':') | 'and' | 'ascending' |
                                                               'case' | 'cast' | 'castable' | 'collation' | 'count' |
                                                               'default' | 'descending' | 'div' | 'else' | 'empty' |
                                                               'end' | 'eq' | 'except' | 'for' | 'ge' | 'group' | 'gt' |
                                                               'idiv' | 'instance' | 'intersect' | 'is' | 'le' | 'let' |
                                                               'lt' | 'mod' | 'ne' | 'only' | 'or' | 'order' |
                                                               'return' | 'satisfies' | 'stable' | 'start' | 'to' |
                                                               'treat' | 'union' | 'where' | '{' :)
  let $state :=
    if ($state[$p:l1] = 194) then                           (: '{' :)
      let $state := p:shift(194, $input, $state)            (: '{' :)
      let $state := p:lookahead1W(31, $input, $state)       (: EPSILON | S^WS | ('(' ':') :)
      let $state := p:parse-PrefixExpr($input, $state)
      let $state := p:lookahead1W(78, $input, $state)       (: S^WS | ('(' ':') | '}' :)
      let $state := p:shift(197, $input, $state)            (: '}' :)
      return $state
    else if ($state[$p:error]) then
      $state
    else
      let $state := p:parse-Prefix($input, $state)
      return $state
  let $state := p:lookahead1W(77, $input, $state)           (: S^WS | ('(' ':') | '{' :)
  let $state := p:shift(194, $input, $state)                (: '{' :)
  let $state := p:lookahead1W(221, $input, $state)          (: Wildcard | EQName^Token | IntegerLiteral |
                                                               DecimalLiteral | DoubleLiteral | StringLiteral | S^WS |
                                                               '$' | '(' | '(#' | ('(' ':') | '+' | '-' | '.' | '..' |
                                                               '/' | '//' | '<' | '<!--' | '<?' | '@' | 'ancestor' |
                                                               'ancestor-or-self' | 'and' | 'ascending' | 'attribute' |
                                                               'case' | 'cast' | 'castable' | 'child' | 'collation' |
                                                               'comment' | 'count' | 'declare' | 'default' |
                                                               'descendant' | 'descendant-or-self' | 'descending' |
                                                               'div' | 'document' | 'document-node' | 'element' |
                                                               'else' | 'empty' | 'empty-sequence' | 'end' | 'eq' |
                                                               'every' | 'except' | 'following' | 'following-sibling' |
                                                               'for' | 'function' | 'ge' | 'group' | 'gt' | 'idiv' |
                                                               'if' | 'import' | 'instance' | 'intersect' | 'is' |
                                                               'item' | 'le' | 'let' | 'lt' | 'mod' | 'module' |
                                                               'namespace' | 'namespace-node' | 'ne' | 'node' | 'only' |
                                                               'or' | 'order' | 'ordered' | 'parent' | 'preceding' |
                                                               'preceding-sibling' | 'processing-instruction' |
                                                               'return' | 'satisfies' | 'schema-attribute' |
                                                               'schema-element' | 'self' | 'some' | 'stable' | 'start' |
                                                               'switch' | 'text' | 'to' | 'treat' | 'try' |
                                                               'typeswitch' | 'union' | 'unordered' | 'validate' |
                                                               'where' | 'xquery' | '}' :)
  let $state :=
    if ($state[$p:error]) then
      $state
    else if ($state[$p:l1] != 197) then                     (: '}' :)
      let $state := p:parse-URIExpr($input, $state)
      return $state
    else
      $state
  let $state := p:lookahead1W(78, $input, $state)           (: S^WS | ('(' ':') | '}' :)
  let $state := p:shift(197, $input, $state)                (: '}' :)
  return p:reduce($state, "CompNamespaceConstructor", $count)
};

(:~
 : Parse CompAttrConstructor.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-CompAttrConstructor($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:shift(77, $input, $state)                 (: 'attribute' :)
  let $state := p:lookahead1W(207, $input, $state)          (: EQName^Token | S^WS | ('(' ':') | 'ancestor' |
                                                               'ancestor-or-self' | 'and' | 'ascending' | 'attribute' |
                                                               'case' | 'cast' | 'castable' | 'child' | 'collation' |
                                                               'comment' | 'count' | 'declare' | 'default' |
                                                               'descendant' | 'descendant-or-self' | 'descending' |
                                                               'div' | 'document' | 'document-node' | 'element' |
                                                               'else' | 'empty' | 'empty-sequence' | 'end' | 'eq' |
                                                               'every' | 'except' | 'following' | 'following-sibling' |
                                                               'for' | 'function' | 'ge' | 'group' | 'gt' | 'idiv' |
                                                               'if' | 'import' | 'instance' | 'intersect' | 'is' |
                                                               'item' | 'le' | 'let' | 'lt' | 'mod' | 'module' |
                                                               'namespace' | 'namespace-node' | 'ne' | 'node' | 'only' |
                                                               'or' | 'order' | 'ordered' | 'parent' | 'preceding' |
                                                               'preceding-sibling' | 'processing-instruction' |
                                                               'return' | 'satisfies' | 'schema-attribute' |
                                                               'schema-element' | 'self' | 'some' | 'stable' | 'start' |
                                                               'switch' | 'text' | 'to' | 'treat' | 'try' |
                                                               'typeswitch' | 'union' | 'unordered' | 'validate' |
                                                               'where' | 'xquery' | '{' :)
  let $state :=
    if ($state[$p:l1] = 194) then                           (: '{' :)
      let $state := p:shift(194, $input, $state)            (: '{' :)
      let $state := p:lookahead1W(31, $input, $state)       (: EPSILON | S^WS | ('(' ':') :)
      let $state := p:parse-Expr($input, $state)
      let $state := p:lookahead1W(78, $input, $state)       (: S^WS | ('(' ':') | '}' :)
      let $state := p:shift(197, $input, $state)            (: '}' :)
      return $state
    else if ($state[$p:error]) then
      $state
    else
      let $state := p:parse-EQName($input, $state)
      return $state
  let $state := p:lookahead1W(77, $input, $state)           (: S^WS | ('(' ':') | '{' :)
  let $state := p:shift(194, $input, $state)                (: '{' :)
  let $state := p:lookahead1W(221, $input, $state)          (: Wildcard | EQName^Token | IntegerLiteral |
                                                               DecimalLiteral | DoubleLiteral | StringLiteral | S^WS |
                                                               '$' | '(' | '(#' | ('(' ':') | '+' | '-' | '.' | '..' |
                                                               '/' | '//' | '<' | '<!--' | '<?' | '@' | 'ancestor' |
                                                               'ancestor-or-self' | 'and' | 'ascending' | 'attribute' |
                                                               'case' | 'cast' | 'castable' | 'child' | 'collation' |
                                                               'comment' | 'count' | 'declare' | 'default' |
                                                               'descendant' | 'descendant-or-self' | 'descending' |
                                                               'div' | 'document' | 'document-node' | 'element' |
                                                               'else' | 'empty' | 'empty-sequence' | 'end' | 'eq' |
                                                               'every' | 'except' | 'following' | 'following-sibling' |
                                                               'for' | 'function' | 'ge' | 'group' | 'gt' | 'idiv' |
                                                               'if' | 'import' | 'instance' | 'intersect' | 'is' |
                                                               'item' | 'le' | 'let' | 'lt' | 'mod' | 'module' |
                                                               'namespace' | 'namespace-node' | 'ne' | 'node' | 'only' |
                                                               'or' | 'order' | 'ordered' | 'parent' | 'preceding' |
                                                               'preceding-sibling' | 'processing-instruction' |
                                                               'return' | 'satisfies' | 'schema-attribute' |
                                                               'schema-element' | 'self' | 'some' | 'stable' | 'start' |
                                                               'switch' | 'text' | 'to' | 'treat' | 'try' |
                                                               'typeswitch' | 'union' | 'unordered' | 'validate' |
                                                               'where' | 'xquery' | '}' :)
  let $state :=
    if ($state[$p:error]) then
      $state
    else if ($state[$p:l1] != 197) then                     (: '}' :)
      let $state := p:parse-Expr($input, $state)
      return $state
    else
      $state
  let $state := p:lookahead1W(78, $input, $state)           (: S^WS | ('(' ':') | '}' :)
  let $state := p:shift(197, $input, $state)                (: '}' :)
  return p:reduce($state, "CompAttrConstructor", $count)
};

(:~
 : Parse ContentExpr.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-ContentExpr($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:parse-Expr($input, $state)
  return p:reduce($state, "ContentExpr", $count)
};

(:~
 : Parse CompElemConstructor.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-CompElemConstructor($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:shift(103, $input, $state)                (: 'element' :)
  let $state := p:lookahead1W(207, $input, $state)          (: EQName^Token | S^WS | ('(' ':') | 'ancestor' |
                                                               'ancestor-or-self' | 'and' | 'ascending' | 'attribute' |
                                                               'case' | 'cast' | 'castable' | 'child' | 'collation' |
                                                               'comment' | 'count' | 'declare' | 'default' |
                                                               'descendant' | 'descendant-or-self' | 'descending' |
                                                               'div' | 'document' | 'document-node' | 'element' |
                                                               'else' | 'empty' | 'empty-sequence' | 'end' | 'eq' |
                                                               'every' | 'except' | 'following' | 'following-sibling' |
                                                               'for' | 'function' | 'ge' | 'group' | 'gt' | 'idiv' |
                                                               'if' | 'import' | 'instance' | 'intersect' | 'is' |
                                                               'item' | 'le' | 'let' | 'lt' | 'mod' | 'module' |
                                                               'namespace' | 'namespace-node' | 'ne' | 'node' | 'only' |
                                                               'or' | 'order' | 'ordered' | 'parent' | 'preceding' |
                                                               'preceding-sibling' | 'processing-instruction' |
                                                               'return' | 'satisfies' | 'schema-attribute' |
                                                               'schema-element' | 'self' | 'some' | 'stable' | 'start' |
                                                               'switch' | 'text' | 'to' | 'treat' | 'try' |
                                                               'typeswitch' | 'union' | 'unordered' | 'validate' |
                                                               'where' | 'xquery' | '{' :)
  let $state :=
    if ($state[$p:l1] = 194) then                           (: '{' :)
      let $state := p:shift(194, $input, $state)            (: '{' :)
      let $state := p:lookahead1W(31, $input, $state)       (: EPSILON | S^WS | ('(' ':') :)
      let $state := p:parse-Expr($input, $state)
      let $state := p:lookahead1W(78, $input, $state)       (: S^WS | ('(' ':') | '}' :)
      let $state := p:shift(197, $input, $state)            (: '}' :)
      return $state
    else if ($state[$p:error]) then
      $state
    else
      let $state := p:parse-EQName($input, $state)
      return $state
  let $state := p:lookahead1W(77, $input, $state)           (: S^WS | ('(' ':') | '{' :)
  let $state := p:shift(194, $input, $state)                (: '{' :)
  let $state := p:lookahead1W(221, $input, $state)          (: Wildcard | EQName^Token | IntegerLiteral |
                                                               DecimalLiteral | DoubleLiteral | StringLiteral | S^WS |
                                                               '$' | '(' | '(#' | ('(' ':') | '+' | '-' | '.' | '..' |
                                                               '/' | '//' | '<' | '<!--' | '<?' | '@' | 'ancestor' |
                                                               'ancestor-or-self' | 'and' | 'ascending' | 'attribute' |
                                                               'case' | 'cast' | 'castable' | 'child' | 'collation' |
                                                               'comment' | 'count' | 'declare' | 'default' |
                                                               'descendant' | 'descendant-or-self' | 'descending' |
                                                               'div' | 'document' | 'document-node' | 'element' |
                                                               'else' | 'empty' | 'empty-sequence' | 'end' | 'eq' |
                                                               'every' | 'except' | 'following' | 'following-sibling' |
                                                               'for' | 'function' | 'ge' | 'group' | 'gt' | 'idiv' |
                                                               'if' | 'import' | 'instance' | 'intersect' | 'is' |
                                                               'item' | 'le' | 'let' | 'lt' | 'mod' | 'module' |
                                                               'namespace' | 'namespace-node' | 'ne' | 'node' | 'only' |
                                                               'or' | 'order' | 'ordered' | 'parent' | 'preceding' |
                                                               'preceding-sibling' | 'processing-instruction' |
                                                               'return' | 'satisfies' | 'schema-attribute' |
                                                               'schema-element' | 'self' | 'some' | 'stable' | 'start' |
                                                               'switch' | 'text' | 'to' | 'treat' | 'try' |
                                                               'typeswitch' | 'union' | 'unordered' | 'validate' |
                                                               'where' | 'xquery' | '}' :)
  let $state :=
    if ($state[$p:error]) then
      $state
    else if ($state[$p:l1] != 197) then                     (: '}' :)
      let $state := p:parse-ContentExpr($input, $state)
      return $state
    else
      $state
  let $state := p:lookahead1W(78, $input, $state)           (: S^WS | ('(' ':') | '}' :)
  let $state := p:shift(197, $input, $state)                (: '}' :)
  return p:reduce($state, "CompElemConstructor", $count)
};

(:~
 : Parse CompDocConstructor.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-CompDocConstructor($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:shift(101, $input, $state)                (: 'document' :)
  let $state := p:lookahead1W(77, $input, $state)           (: S^WS | ('(' ':') | '{' :)
  let $state := p:shift(194, $input, $state)                (: '{' :)
  let $state := p:lookahead1W(31, $input, $state)           (: EPSILON | S^WS | ('(' ':') :)
  let $state := p:parse-Expr($input, $state)
  let $state := p:lookahead1W(78, $input, $state)           (: S^WS | ('(' ':') | '}' :)
  let $state := p:shift(197, $input, $state)                (: '}' :)
  return p:reduce($state, "CompDocConstructor", $count)
};

(:~
 : Parse ComputedConstructor.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-ComputedConstructor($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state :=
    if ($state[$p:l1] = 101) then                           (: 'document' :)
      let $state := p:parse-CompDocConstructor($input, $state)
      return $state
    else if ($state[$p:l1] = 103) then                      (: 'element' :)
      let $state := p:parse-CompElemConstructor($input, $state)
      return $state
    else if ($state[$p:l1] = 77) then                       (: 'attribute' :)
      let $state := p:parse-CompAttrConstructor($input, $state)
      return $state
    else if ($state[$p:l1] = 140) then                      (: 'namespace' :)
      let $state := p:parse-CompNamespaceConstructor($input, $state)
      return $state
    else if ($state[$p:l1] = 176) then                      (: 'text' :)
      let $state := p:parse-CompTextConstructor($input, $state)
      return $state
    else if ($state[$p:l1] = 87) then                       (: 'comment' :)
      let $state := p:parse-CompCommentConstructor($input, $state)
      return $state
    else if ($state[$p:error]) then
      $state
    else
      let $state := p:parse-CompPIConstructor($input, $state)
      return $state
  return p:reduce($state, "ComputedConstructor", $count)
};

(:~
 : Parse DirPIConstructor.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-DirPIConstructor($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:shift(58, $input, $state)                 (: '<?' :)
  let $state := p:lookahead1(4, $input, $state)             (: PITarget :)
  let $state := p:shift(19, $input, $state)                 (: PITarget :)
  let $state := p:lookahead1(24, $input, $state)            (: S | '?>' :)
  let $state :=
    if ($state[$p:error]) then
      $state
    else if ($state[$p:l1] = 23) then                       (: S :)
      let $state := p:shift(23, $input, $state)             (: S :)
      let $state := p:lookahead1(2, $input, $state)         (: DirPIContents :)
      let $state := p:shift(4, $input, $state)              (: DirPIContents :)
      return $state
    else
      $state
  let $state := p:lookahead1(13, $input, $state)            (: '?>' :)
  let $state := p:shift(64, $input, $state)                 (: '?>' :)
  return p:reduce($state, "DirPIConstructor", $count)
};

(:~
 : Parse DirCommentConstructor.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-DirCommentConstructor($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:shift(53, $input, $state)                 (: '<!--' :)
  let $state := p:lookahead1(1, $input, $state)             (: DirCommentContents :)
  let $state := p:shift(3, $input, $state)                  (: DirCommentContents :)
  let $state := p:lookahead1(10, $input, $state)            (: '-->' :)
  let $state := p:shift(42, $input, $state)                 (: '-->' :)
  return p:reduce($state, "DirCommentConstructor", $count)
};

(:~
 : Parse CDataSection.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-CDataSection($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:shift(54, $input, $state)                 (: '<![CDATA[' :)
  let $state := p:lookahead1(3, $input, $state)             (: CDataSectionContents :)
  let $state := p:shift(5, $input, $state)                  (: CDataSectionContents :)
  let $state := p:lookahead1(14, $input, $state)            (: ']]>' :)
  let $state := p:shift(69, $input, $state)                 (: ']]>' :)
  return p:reduce($state, "CDataSection", $count)
};

(:~
 : Parse DirElemContent.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-DirElemContent($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state :=
    if ($state[$p:l1] = 52                                  (: '<' :)
     or $state[$p:l1] = 53                                  (: '<!--' :)
     or $state[$p:l1] = 58) then                            (: '<?' :)
      let $state := p:parse-DirectConstructor($input, $state)
      return $state
    else if ($state[$p:l1] = 54) then                       (: '<![CDATA[' :)
      let $state := p:parse-CDataSection($input, $state)
      return $state
    else if ($state[$p:l1] = 16) then                       (: ElementContentChar :)
      let $state := p:shift(16, $input, $state)             (: ElementContentChar :)
      return $state
    else if ($state[$p:error]) then
      $state
    else
      let $state := p:parse-CommonContent($input, $state)
      return $state
  return p:reduce($state, "DirElemContent", $count)
};

(:~
 : Parse AposAttrValueContent.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-AposAttrValueContent($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state :=
    if ($state[$p:l1] = 18) then                            (: AposAttrContentChar :)
      let $state := p:shift(18, $input, $state)             (: AposAttrContentChar :)
      return $state
    else if ($state[$p:error]) then
      $state
    else
      let $state := p:parse-CommonContent($input, $state)
      return $state
  return p:reduce($state, "AposAttrValueContent", $count)
};

(:~
 : Parse EnclosedExpr.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-EnclosedExpr($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:lookahead1(20, $input, $state)            (: '{' :)
  let $state := p:shift(194, $input, $state)                (: '{' :)
  let $state := p:lookahead1W(31, $input, $state)           (: EPSILON | S^WS | ('(' ':') :)
  let $state := p:parse-Expr($input, $state)
  let $state := p:lookahead1W(78, $input, $state)           (: S^WS | ('(' ':') | '}' :)
  let $state := p:shift(197, $input, $state)                (: '}' :)
  return p:reduce($state, "EnclosedExpr", $count)
};

(:~
 : Parse CommonContent.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-CommonContent($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state :=
    if ($state[$p:l1] = 13) then                            (: PredefinedEntityRef :)
      let $state := p:shift(13, $input, $state)             (: PredefinedEntityRef :)
      return $state
    else if ($state[$p:l1] = 20) then                       (: CharRef :)
      let $state := p:shift(20, $input, $state)             (: CharRef :)
      return $state
    else if ($state[$p:l1] = 195) then                      (: '{{' :)
      let $state := p:shift(195, $input, $state)            (: '{{' :)
      return $state
    else if ($state[$p:l1] = 198) then                      (: '}}' :)
      let $state := p:shift(198, $input, $state)            (: '}}' :)
      return $state
    else if ($state[$p:error]) then
      $state
    else
      let $state := p:parse-EnclosedExpr($input, $state)
      return $state
  return p:reduce($state, "CommonContent", $count)
};

(:~
 : Parse QuotAttrValueContent.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-QuotAttrValueContent($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state :=
    if ($state[$p:l1] = 17) then                            (: QuotAttrContentChar :)
      let $state := p:shift(17, $input, $state)             (: QuotAttrContentChar :)
      return $state
    else if ($state[$p:error]) then
      $state
    else
      let $state := p:parse-CommonContent($input, $state)
      return $state
  return p:reduce($state, "QuotAttrValueContent", $count)
};

(:~
 : Parse the 1st loop of production DirAttributeValue (zero or more). Use
 : tail recursion for iteratively updating the parser state.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-DirAttributeValue-1($input as xs:string, $state as item()+) as item()+
{
  if ($state[$p:error]) then
    $state
  else
    let $state := p:lookahead1(147, $input, $state)         (: PredefinedEntityRef | EscapeQuot | QuotAttrContentChar |
                                                               CharRef | '"' | '{' | '{{' | '}}' :)
    return
      if ($state[$p:l1] = 27) then                          (: '"' :)
        $state
      else
        let $state :=
          if ($state[$p:l1] = 14) then                      (: EscapeQuot :)
            let $state := p:shift(14, $input, $state)       (: EscapeQuot :)
            return $state
          else if ($state[$p:error]) then
            $state
          else
            let $state := p:parse-QuotAttrValueContent($input, $state)
            return $state
        return p:parse-DirAttributeValue-1($input, $state)
};

(:~
 : Parse the 2nd loop of production DirAttributeValue (zero or more). Use
 : tail recursion for iteratively updating the parser state.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-DirAttributeValue-2($input as xs:string, $state as item()+) as item()+
{
  if ($state[$p:error]) then
    $state
  else
    let $state := p:lookahead1(148, $input, $state)         (: PredefinedEntityRef | EscapeApos | AposAttrContentChar |
                                                               CharRef | "'" | '{' | '{{' | '}}' :)
    return
      if ($state[$p:l1] = 32) then                          (: "'" :)
        $state
      else
        let $state :=
          if ($state[$p:l1] = 15) then                      (: EscapeApos :)
            let $state := p:shift(15, $input, $state)       (: EscapeApos :)
            return $state
          else if ($state[$p:error]) then
            $state
          else
            let $state := p:parse-AposAttrValueContent($input, $state)
            return $state
        return p:parse-DirAttributeValue-2($input, $state)
};

(:~
 : Parse DirAttributeValue.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-DirAttributeValue($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:lookahead1(26, $input, $state)            (: '"' | "'" :)
  let $state :=
    if ($state[$p:l1] = 27) then                            (: '"' :)
      let $state := p:shift(27, $input, $state)             (: '"' :)
      let $state := p:parse-DirAttributeValue-1($input, $state)
      let $state := p:shift(27, $input, $state)             (: '"' :)
      return $state
    else if ($state[$p:error]) then
      $state
    else
      let $state := p:shift(32, $input, $state)             (: "'" :)
      let $state := p:parse-DirAttributeValue-2($input, $state)
      let $state := p:shift(32, $input, $state)             (: "'" :)
      return $state
  return p:reduce($state, "DirAttributeValue", $count)
};

(:~
 : Parse the 1st loop of production DirAttributeList (zero or more). Use
 : tail recursion for iteratively updating the parser state.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-DirAttributeList-1($input as xs:string, $state as item()+) as item()+
{
  if ($state[$p:error]) then
    $state
  else
    let $state := p:lookahead1(37, $input, $state)          (: S | '/>' | '>' :)
    return
      if ($state[$p:l1] != 23) then                         (: S :)
        $state
      else
        let $state := p:shift(23, $input, $state)           (: S :)
        let $state := p:lookahead1(83, $input, $state)      (: QName | S | '/>' | '>' :)
        let $state :=
          if ($state[$p:error]) then
            $state
          else if ($state[$p:l1] = 22) then                 (: QName :)
            let $state := p:shift(22, $input, $state)       (: QName :)
            let $state := p:lookahead1(22, $input, $state)  (: S | '=' :)
            let $state :=
              if ($state[$p:error]) then
                $state
              else if ($state[$p:l1] = 23) then             (: S :)
                let $state := p:shift(23, $input, $state)   (: S :)
                return $state
              else
                $state
            let $state := p:lookahead1(11, $input, $state)  (: '=' :)
            let $state := p:shift(59, $input, $state)       (: '=' :)
            let $state := p:lookahead1(36, $input, $state)  (: S | '"' | "'" :)
            let $state :=
              if ($state[$p:error]) then
                $state
              else if ($state[$p:l1] = 23) then             (: S :)
                let $state := p:shift(23, $input, $state)   (: S :)
                return $state
              else
                $state
            let $state := p:parse-DirAttributeValue($input, $state)
            return $state
          else
            $state
        return p:parse-DirAttributeList-1($input, $state)
};

(:~
 : Parse DirAttributeList.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-DirAttributeList($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:parse-DirAttributeList-1($input, $state)
  return p:reduce($state, "DirAttributeList", $count)
};

(:~
 : Parse the 1st loop of production DirElemConstructor (zero or more). Use
 : tail recursion for iteratively updating the parser state.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-DirElemConstructor-1($input as xs:string, $state as item()+) as item()+
{
  if ($state[$p:error]) then
    $state
  else
    let $state := p:lookahead1(153, $input, $state)         (: PredefinedEntityRef | ElementContentChar | CharRef |
                                                               '<' | '<!--' | '<![CDATA[' | '</' | '<?' | '{' | '{{' |
                                                               '}}' :)
    return
      if ($state[$p:l1] = 55) then                          (: '</' :)
        $state
      else
        let $state := p:parse-DirElemContent($input, $state)
        return p:parse-DirElemConstructor-1($input, $state)
};

(:~
 : Parse DirElemConstructor.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-DirElemConstructor($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:shift(52, $input, $state)                 (: '<' :)
  let $state := p:lookahead1(5, $input, $state)             (: QName :)
  let $state := p:shift(22, $input, $state)                 (: QName :)
  let $state := p:parse-DirAttributeList($input, $state)
  let $state := p:lookahead1(27, $input, $state)            (: '/>' | '>' :)
  let $state :=
    if ($state[$p:l1] = 47) then                            (: '/>' :)
      let $state := p:shift(47, $input, $state)             (: '/>' :)
      return $state
    else if ($state[$p:error]) then
      $state
    else
      let $state := p:shift(60, $input, $state)             (: '>' :)
      let $state := p:parse-DirElemConstructor-1($input, $state)
      let $state := p:shift(55, $input, $state)             (: '</' :)
      let $state := p:lookahead1(5, $input, $state)         (: QName :)
      let $state := p:shift(22, $input, $state)             (: QName :)
      let $state := p:lookahead1(23, $input, $state)        (: S | '>' :)
      let $state :=
        if ($state[$p:error]) then
          $state
        else if ($state[$p:l1] = 23) then                   (: S :)
          let $state := p:shift(23, $input, $state)         (: S :)
          return $state
        else
          $state
      let $state := p:lookahead1(12, $input, $state)        (: '>' :)
      let $state := p:shift(60, $input, $state)             (: '>' :)
      return $state
  return p:reduce($state, "DirElemConstructor", $count)
};

(:~
 : Parse DirectConstructor.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-DirectConstructor($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state :=
    if ($state[$p:l1] = 52) then                            (: '<' :)
      let $state := p:parse-DirElemConstructor($input, $state)
      return $state
    else if ($state[$p:l1] = 53) then                       (: '<!--' :)
      let $state := p:parse-DirCommentConstructor($input, $state)
      return $state
    else if ($state[$p:error]) then
      $state
    else
      let $state := p:parse-DirPIConstructor($input, $state)
      return $state
  return p:reduce($state, "DirectConstructor", $count)
};

(:~
 : Parse Constructor.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-Constructor($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state :=
    if ($state[$p:l1] = 52                                  (: '<' :)
     or $state[$p:l1] = 53                                  (: '<!--' :)
     or $state[$p:l1] = 58) then                            (: '<?' :)
      let $state := p:parse-DirectConstructor($input, $state)
      return $state
    else if ($state[$p:error]) then
      $state
    else
      let $state := p:parse-ComputedConstructor($input, $state)
      return $state
  return p:reduce($state, "Constructor", $count)
};

(:~
 : Parse UnorderedExpr.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-UnorderedExpr($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:shift(185, $input, $state)                (: 'unordered' :)
  let $state := p:lookahead1W(77, $input, $state)           (: S^WS | ('(' ':') | '{' :)
  let $state := p:shift(194, $input, $state)                (: '{' :)
  let $state := p:lookahead1W(31, $input, $state)           (: EPSILON | S^WS | ('(' ':') :)
  let $state := p:parse-Expr($input, $state)
  let $state := p:lookahead1W(78, $input, $state)           (: S^WS | ('(' ':') | '}' :)
  let $state := p:shift(197, $input, $state)                (: '}' :)
  return p:reduce($state, "UnorderedExpr", $count)
};

(:~
 : Parse OrderedExpr.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-OrderedExpr($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:shift(152, $input, $state)                (: 'ordered' :)
  let $state := p:lookahead1W(77, $input, $state)           (: S^WS | ('(' ':') | '{' :)
  let $state := p:shift(194, $input, $state)                (: '{' :)
  let $state := p:lookahead1W(31, $input, $state)           (: EPSILON | S^WS | ('(' ':') :)
  let $state := p:parse-Expr($input, $state)
  let $state := p:lookahead1W(78, $input, $state)           (: S^WS | ('(' ':') | '}' :)
  let $state := p:shift(197, $input, $state)                (: '}' :)
  return p:reduce($state, "OrderedExpr", $count)
};

(:~
 : Parse ArgumentPlaceholder.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-ArgumentPlaceholder($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:shift(63, $input, $state)                 (: '?' :)
  return p:reduce($state, "ArgumentPlaceholder", $count)
};

(:~
 : Parse Argument.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-Argument($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:lookahead1W(219, $input, $state)          (: Wildcard | EQName^Token | IntegerLiteral |
                                                               DecimalLiteral | DoubleLiteral | StringLiteral | S^WS |
                                                               '$' | '(' | '(#' | ('(' ':') | '+' | '-' | '.' | '..' |
                                                               '/' | '//' | '<' | '<!--' | '<?' | '?' | '@' |
                                                               'ancestor' | 'ancestor-or-self' | 'and' | 'ascending' |
                                                               'attribute' | 'case' | 'cast' | 'castable' | 'child' |
                                                               'collation' | 'comment' | 'count' | 'declare' |
                                                               'default' | 'descendant' | 'descendant-or-self' |
                                                               'descending' | 'div' | 'document' | 'document-node' |
                                                               'element' | 'else' | 'empty' | 'empty-sequence' | 'end' |
                                                               'eq' | 'every' | 'except' | 'following' |
                                                               'following-sibling' | 'for' | 'function' | 'ge' |
                                                               'group' | 'gt' | 'idiv' | 'if' | 'import' | 'instance' |
                                                               'intersect' | 'is' | 'item' | 'le' | 'let' | 'lt' |
                                                               'mod' | 'module' | 'namespace' | 'namespace-node' |
                                                               'ne' | 'node' | 'only' | 'or' | 'order' | 'ordered' |
                                                               'parent' | 'preceding' | 'preceding-sibling' |
                                                               'processing-instruction' | 'return' | 'satisfies' |
                                                               'schema-attribute' | 'schema-element' | 'self' | 'some' |
                                                               'stable' | 'start' | 'switch' | 'text' | 'to' | 'treat' |
                                                               'try' | 'typeswitch' | 'union' | 'unordered' |
                                                               'validate' | 'where' | 'xquery' :)
  let $state :=
    if ($state[$p:l1] = 63) then                            (: '?' :)
      let $state := p:parse-ArgumentPlaceholder($input, $state)
      return $state
    else if ($state[$p:error]) then
      $state
    else
      let $state := p:parse-ExprSingle($input, $state)
      return $state
  return p:reduce($state, "Argument", $count)
};

(:~
 : Parse the 1st loop of production ArgumentList (zero or more). Use
 : tail recursion for iteratively updating the parser state.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-ArgumentList-1($input as xs:string, $state as item()+) as item()+
{
  if ($state[$p:error]) then
    $state
  else
    let $state := p:lookahead1W(91, $input, $state)         (: S^WS | ('(' ':') | ')' | ',' :)
    return
      if ($state[$p:l1] != 40) then                         (: ',' :)
        $state
      else
        let $state := p:shift(40, $input, $state)           (: ',' :)
        let $state := p:lookahead1W(31, $input, $state)     (: EPSILON | S^WS | ('(' ':') :)
        let $state := p:parse-Argument($input, $state)
        return p:parse-ArgumentList-1($input, $state)
};

(:~
 : Parse ArgumentList.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-ArgumentList($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:lookahead1(8, $input, $state)             (: '(' :)
  let $state := p:shift(33, $input, $state)                 (: '(' :)
  let $state := p:lookahead1W(223, $input, $state)          (: Wildcard | EQName^Token | IntegerLiteral |
                                                               DecimalLiteral | DoubleLiteral | StringLiteral | S^WS |
                                                               '$' | '(' | '(#' | ('(' ':') | ')' | '+' | '-' | '.' |
                                                               '..' | '/' | '//' | '<' | '<!--' | '<?' | '?' | '@' |
                                                               'ancestor' | 'ancestor-or-self' | 'and' | 'ascending' |
                                                               'attribute' | 'case' | 'cast' | 'castable' | 'child' |
                                                               'collation' | 'comment' | 'count' | 'declare' |
                                                               'default' | 'descendant' | 'descendant-or-self' |
                                                               'descending' | 'div' | 'document' | 'document-node' |
                                                               'element' | 'else' | 'empty' | 'empty-sequence' | 'end' |
                                                               'eq' | 'every' | 'except' | 'following' |
                                                               'following-sibling' | 'for' | 'function' | 'ge' |
                                                               'group' | 'gt' | 'idiv' | 'if' | 'import' | 'instance' |
                                                               'intersect' | 'is' | 'item' | 'le' | 'let' | 'lt' |
                                                               'mod' | 'module' | 'namespace' | 'namespace-node' |
                                                               'ne' | 'node' | 'only' | 'or' | 'order' | 'ordered' |
                                                               'parent' | 'preceding' | 'preceding-sibling' |
                                                               'processing-instruction' | 'return' | 'satisfies' |
                                                               'schema-attribute' | 'schema-element' | 'self' | 'some' |
                                                               'stable' | 'start' | 'switch' | 'text' | 'to' | 'treat' |
                                                               'try' | 'typeswitch' | 'union' | 'unordered' |
                                                               'validate' | 'where' | 'xquery' :)
  let $state :=
    if ($state[$p:error]) then
      $state
    else if ($state[$p:l1] != 36) then                      (: ')' :)
      let $state := p:parse-Argument($input, $state)
      let $state := p:parse-ArgumentList-1($input, $state)
      return $state
    else
      $state
  let $state := p:lookahead1W(41, $input, $state)           (: S^WS | ('(' ':') | ')' :)
  let $state := p:shift(36, $input, $state)                 (: ')' :)
  return p:reduce($state, "ArgumentList", $count)
};

(:~
 : Parse FunctionCall.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-FunctionCall($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:parse-FunctionName($input, $state)
  let $state := p:lookahead1W(31, $input, $state)           (: EPSILON | S^WS | ('(' ':') :)
  let $state := p:parse-ArgumentList($input, $state)
  return p:reduce($state, "FunctionCall", $count)
};

(:~
 : Parse ContextItemExpr.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-ContextItemExpr($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:shift(43, $input, $state)                 (: '.' :)
  return p:reduce($state, "ContextItemExpr", $count)
};

(:~
 : Parse ParenthesizedExpr.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-ParenthesizedExpr($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:shift(33, $input, $state)                 (: '(' :)
  let $state := p:lookahead1W(218, $input, $state)          (: Wildcard | EQName^Token | IntegerLiteral |
                                                               DecimalLiteral | DoubleLiteral | StringLiteral | S^WS |
                                                               '$' | '(' | '(#' | ('(' ':') | ')' | '+' | '-' | '.' |
                                                               '..' | '/' | '//' | '<' | '<!--' | '<?' | '@' |
                                                               'ancestor' | 'ancestor-or-self' | 'and' | 'ascending' |
                                                               'attribute' | 'case' | 'cast' | 'castable' | 'child' |
                                                               'collation' | 'comment' | 'count' | 'declare' |
                                                               'default' | 'descendant' | 'descendant-or-self' |
                                                               'descending' | 'div' | 'document' | 'document-node' |
                                                               'element' | 'else' | 'empty' | 'empty-sequence' | 'end' |
                                                               'eq' | 'every' | 'except' | 'following' |
                                                               'following-sibling' | 'for' | 'function' | 'ge' |
                                                               'group' | 'gt' | 'idiv' | 'if' | 'import' | 'instance' |
                                                               'intersect' | 'is' | 'item' | 'le' | 'let' | 'lt' |
                                                               'mod' | 'module' | 'namespace' | 'namespace-node' |
                                                               'ne' | 'node' | 'only' | 'or' | 'order' | 'ordered' |
                                                               'parent' | 'preceding' | 'preceding-sibling' |
                                                               'processing-instruction' | 'return' | 'satisfies' |
                                                               'schema-attribute' | 'schema-element' | 'self' | 'some' |
                                                               'stable' | 'start' | 'switch' | 'text' | 'to' | 'treat' |
                                                               'try' | 'typeswitch' | 'union' | 'unordered' |
                                                               'validate' | 'where' | 'xquery' :)
  let $state :=
    if ($state[$p:error]) then
      $state
    else if ($state[$p:l1] != 36) then                      (: ')' :)
      let $state := p:parse-Expr($input, $state)
      return $state
    else
      $state
  let $state := p:lookahead1W(41, $input, $state)           (: S^WS | ('(' ':') | ')' :)
  let $state := p:shift(36, $input, $state)                 (: ')' :)
  return p:reduce($state, "ParenthesizedExpr", $count)
};

(:~
 : Parse VarRef.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-VarRef($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:shift(30, $input, $state)                 (: '$' :)
  let $state := p:lookahead1W(205, $input, $state)          (: EQName^Token | S^WS | ('(' ':') | 'ancestor' |
                                                               'ancestor-or-self' | 'and' | 'ascending' | 'attribute' |
                                                               'case' | 'cast' | 'castable' | 'child' | 'collation' |
                                                               'comment' | 'count' | 'declare' | 'default' |
                                                               'descendant' | 'descendant-or-self' | 'descending' |
                                                               'div' | 'document' | 'document-node' | 'element' |
                                                               'else' | 'empty' | 'empty-sequence' | 'end' | 'eq' |
                                                               'every' | 'except' | 'following' | 'following-sibling' |
                                                               'for' | 'function' | 'ge' | 'group' | 'gt' | 'idiv' |
                                                               'if' | 'import' | 'instance' | 'intersect' | 'is' |
                                                               'item' | 'le' | 'let' | 'lt' | 'mod' | 'module' |
                                                               'namespace' | 'namespace-node' | 'ne' | 'node' | 'only' |
                                                               'or' | 'order' | 'ordered' | 'parent' | 'preceding' |
                                                               'preceding-sibling' | 'processing-instruction' |
                                                               'return' | 'satisfies' | 'schema-attribute' |
                                                               'schema-element' | 'self' | 'some' | 'stable' | 'start' |
                                                               'switch' | 'text' | 'to' | 'treat' | 'try' |
                                                               'typeswitch' | 'union' | 'unordered' | 'validate' |
                                                               'where' | 'xquery' :)
  let $state := p:parse-VarName($input, $state)
  return p:reduce($state, "VarRef", $count)
};

(:~
 : Parse PrimaryExpr.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-PrimaryExpr($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:lookahead1(214, $input, $state)           (: EQName^Token | IntegerLiteral | DecimalLiteral |
                                                               DoubleLiteral | StringLiteral | '$' | '(' | '.' | '<' |
                                                               '<!--' | '<?' | 'ancestor' | 'ancestor-or-self' | 'and' |
                                                               'ascending' | 'attribute' | 'case' | 'cast' |
                                                               'castable' | 'child' | 'collation' | 'comment' |
                                                               'count' | 'declare' | 'default' | 'descendant' |
                                                               'descendant-or-self' | 'descending' | 'div' |
                                                               'document' | 'document-node' | 'element' | 'else' |
                                                               'empty' | 'empty-sequence' | 'end' | 'eq' | 'every' |
                                                               'except' | 'following' | 'following-sibling' | 'for' |
                                                               'function' | 'ge' | 'group' | 'gt' | 'idiv' | 'if' |
                                                               'import' | 'instance' | 'intersect' | 'is' | 'item' |
                                                               'le' | 'let' | 'lt' | 'mod' | 'module' | 'namespace' |
                                                               'namespace-node' | 'ne' | 'node' | 'only' | 'or' |
                                                               'order' | 'ordered' | 'parent' | 'preceding' |
                                                               'preceding-sibling' | 'processing-instruction' |
                                                               'return' | 'satisfies' | 'schema-attribute' |
                                                               'schema-element' | 'self' | 'some' | 'stable' | 'start' |
                                                               'switch' | 'text' | 'to' | 'treat' | 'try' |
                                                               'typeswitch' | 'union' | 'unordered' | 'validate' |
                                                               'where' | 'xquery' :)
  let $state :=
    if ($state[$p:l1] = 140) then                           (: 'namespace' :)
      let $state := p:lookahead2W(174, $input, $state)      (: NCName^Token | S^WS | '#' | '(' | ('(' ':') | 'and' |
                                                               'ascending' | 'case' | 'cast' | 'castable' |
                                                               'collation' | 'count' | 'default' | 'descending' |
                                                               'div' | 'else' | 'empty' | 'end' | 'eq' | 'except' |
                                                               'for' | 'ge' | 'group' | 'gt' | 'idiv' | 'instance' |
                                                               'intersect' | 'is' | 'le' | 'let' | 'lt' | 'mod' | 'ne' |
                                                               'only' | 'or' | 'order' | 'return' | 'satisfies' |
                                                               'stable' | 'start' | 'to' | 'treat' | 'union' | 'where' |
                                                               '{' :)
      return $state
    else if ($state[$p:l1] = 162) then                      (: 'processing-instruction' :)
      let $state := p:lookahead2W(172, $input, $state)      (: NCName^Token | S^WS | '#' | ('(' ':') | 'and' |
                                                               'ascending' | 'case' | 'cast' | 'castable' |
                                                               'collation' | 'count' | 'default' | 'descending' |
                                                               'div' | 'else' | 'empty' | 'end' | 'eq' | 'except' |
                                                               'for' | 'ge' | 'group' | 'gt' | 'idiv' | 'instance' |
                                                               'intersect' | 'is' | 'le' | 'let' | 'lt' | 'mod' | 'ne' |
                                                               'only' | 'or' | 'order' | 'return' | 'satisfies' |
                                                               'stable' | 'start' | 'to' | 'treat' | 'union' | 'where' |
                                                               '{' :)
      return $state
    else if ($state[$p:l1] = 77                             (: 'element' :)
          or $state[$p:l1] = 103) then                      (: 'element' :)
      let $state := p:lookahead2W(208, $input, $state)      (: EQName^Token | S^WS | '#' | ('(' ':') | 'ancestor' |
                                                               'ancestor-or-self' | 'and' | 'ascending' | 'attribute' |
                                                               'case' | 'cast' | 'castable' | 'child' | 'collation' |
                                                               'comment' | 'count' | 'declare' | 'default' |
                                                               'descendant' | 'descendant-or-self' | 'descending' |
                                                               'div' | 'document' | 'document-node' | 'element' |
                                                               'else' | 'empty' | 'empty-sequence' | 'end' | 'eq' |
                                                               'every' | 'except' | 'following' | 'following-sibling' |
                                                               'for' | 'function' | 'ge' | 'group' | 'gt' | 'idiv' |
                                                               'if' | 'import' | 'instance' | 'intersect' | 'is' |
                                                               'item' | 'le' | 'let' | 'lt' | 'mod' | 'module' |
                                                               'namespace' | 'namespace-node' | 'ne' | 'node' | 'only' |
                                                               'or' | 'order' | 'ordered' | 'parent' | 'preceding' |
                                                               'preceding-sibling' | 'processing-instruction' |
                                                               'return' | 'satisfies' | 'schema-attribute' |
                                                               'schema-element' | 'self' | 'some' | 'stable' | 'start' |
                                                               'switch' | 'text' | 'to' | 'treat' | 'try' |
                                                               'typeswitch' | 'union' | 'unordered' | 'validate' |
                                                               'where' | 'xquery' | '{' :)
      return $state
    else if ($state[$p:l1] = 87                             (: 'text' :)
          or $state[$p:l1] = 176) then                      (: 'text' :)
      let $state := p:lookahead2W(85, $input, $state)       (: S^WS | '#' | ('(' ':') | '{' :)
      return $state
    else if ($state[$p:l1] = 101                            (: 'ordered' :)
          or $state[$p:l1] = 152                            (: 'unordered' :)
          or $state[$p:l1] = 185) then                      (: 'unordered' :)
      let $state := p:lookahead2W(125, $input, $state)      (: S^WS | '#' | '(' | ('(' ':') | '{' :)
      return $state
    else if ($state[$p:l1] = 7                              (: 'ancestor' :)
          or $state[$p:l1] = 71                             (: 'ancestor-or-self' :)
          or $state[$p:l1] = 72                             (: 'and' :)
          or $state[$p:l1] = 73                             (: 'ascending' :)
          or $state[$p:l1] = 75                             (: 'case' :)
          or $state[$p:l1] = 81                             (: 'cast' :)
          or $state[$p:l1] = 82                             (: 'castable' :)
          or $state[$p:l1] = 83                             (: 'child' :)
          or $state[$p:l1] = 85                             (: 'collation' :)
          or $state[$p:l1] = 86                             (: 'count' :)
          or $state[$p:l1] = 91                             (: 'declare' :)
          or $state[$p:l1] = 94                             (: 'default' :)
          or $state[$p:l1] = 95                             (: 'descendant' :)
          or $state[$p:l1] = 96                             (: 'descendant-or-self' :)
          or $state[$p:l1] = 97                             (: 'descending' :)
          or $state[$p:l1] = 98                             (: 'div' :)
          or $state[$p:l1] = 100                            (: 'else' :)
          or $state[$p:l1] = 104                            (: 'empty' :)
          or $state[$p:l1] = 105                            (: 'end' :)
          or $state[$p:l1] = 108                            (: 'eq' :)
          or $state[$p:l1] = 109                            (: 'every' :)
          or $state[$p:l1] = 110                            (: 'except' :)
          or $state[$p:l1] = 111                            (: 'following' :)
          or $state[$p:l1] = 113                            (: 'following-sibling' :)
          or $state[$p:l1] = 114                            (: 'for' :)
          or $state[$p:l1] = 115                            (: 'ge' :)
          or $state[$p:l1] = 117                            (: 'group' :)
          or $state[$p:l1] = 119                            (: 'gt' :)
          or $state[$p:l1] = 121                            (: 'idiv' :)
          or $state[$p:l1] = 122                            (: 'import' :)
          or $state[$p:l1] = 124                            (: 'instance' :)
          or $state[$p:l1] = 128                            (: 'intersect' :)
          or $state[$p:l1] = 129                            (: 'is' :)
          or $state[$p:l1] = 130                            (: 'le' :)
          or $state[$p:l1] = 133                            (: 'let' :)
          or $state[$p:l1] = 135                            (: 'lt' :)
          or $state[$p:l1] = 136                            (: 'mod' :)
          or $state[$p:l1] = 138                            (: 'module' :)
          or $state[$p:l1] = 139                            (: 'ne' :)
          or $state[$p:l1] = 142                            (: 'only' :)
          or $state[$p:l1] = 148                            (: 'or' :)
          or $state[$p:l1] = 150                            (: 'order' :)
          or $state[$p:l1] = 151                            (: 'parent' :)
          or $state[$p:l1] = 154                            (: 'preceding' :)
          or $state[$p:l1] = 158                            (: 'preceding-sibling' :)
          or $state[$p:l1] = 159                            (: 'return' :)
          or $state[$p:l1] = 163                            (: 'satisfies' :)
          or $state[$p:l1] = 164                            (: 'self' :)
          or $state[$p:l1] = 168                            (: 'some' :)
          or $state[$p:l1] = 170                            (: 'stable' :)
          or $state[$p:l1] = 171                            (: 'start' :)
          or $state[$p:l1] = 172                            (: 'to' :)
          or $state[$p:l1] = 178                            (: 'treat' :)
          or $state[$p:l1] = 179                            (: 'try' :)
          or $state[$p:l1] = 180                            (: 'union' :)
          or $state[$p:l1] = 184                            (: 'validate' :)
          or $state[$p:l1] = 186                            (: 'where' :)
          or $state[$p:l1] = 190                            (: 'xquery' :)
          or $state[$p:l1] = 192) then                      (: 'xquery' :)
      let $state := p:lookahead2W(84, $input, $state)       (: S^WS | '#' | '(' | ('(' ':') :)
      return $state
    else
      ($state[$p:l1], subsequence($state, $p:lk + 1))
  let $state :=
    if ($state[$p:lk] = 9                                   (: IntegerLiteral :)
     or $state[$p:lk] = 10                                  (: DecimalLiteral :)
     or $state[$p:lk] = 11                                  (: DoubleLiteral :)
     or $state[$p:lk] = 12) then                            (: StringLiteral :)
      let $state := p:parse-Literal($input, $state)
      return $state
    else if ($state[$p:lk] = 30) then                       (: '$' :)
      let $state := p:parse-VarRef($input, $state)
      return $state
    else if ($state[$p:lk] = 33) then                       (: '(' :)
      let $state := p:parse-ParenthesizedExpr($input, $state)
      return $state
    else if ($state[$p:lk] = 43) then                       (: '.' :)
      let $state := p:parse-ContextItemExpr($input, $state)
      return $state
    else if ($state[$p:lk] = 8455                           (: EQName^Token '(' :)
          or $state[$p:lk] = 8519                           (: 'ancestor' '(' :)
          or $state[$p:lk] = 8520                           (: 'ancestor-or-self' '(' :)
          or $state[$p:lk] = 8521                           (: 'and' '(' :)
          or $state[$p:lk] = 8523                           (: 'ascending' '(' :)
          or $state[$p:lk] = 8529                           (: 'case' '(' :)
          or $state[$p:lk] = 8530                           (: 'cast' '(' :)
          or $state[$p:lk] = 8531                           (: 'castable' '(' :)
          or $state[$p:lk] = 8533                           (: 'child' '(' :)
          or $state[$p:lk] = 8534                           (: 'collation' '(' :)
          or $state[$p:lk] = 8539                           (: 'count' '(' :)
          or $state[$p:lk] = 8542                           (: 'declare' '(' :)
          or $state[$p:lk] = 8543                           (: 'default' '(' :)
          or $state[$p:lk] = 8544                           (: 'descendant' '(' :)
          or $state[$p:lk] = 8545                           (: 'descendant-or-self' '(' :)
          or $state[$p:lk] = 8546                           (: 'descending' '(' :)
          or $state[$p:lk] = 8548                           (: 'div' '(' :)
          or $state[$p:lk] = 8549                           (: 'document' '(' :)
          or $state[$p:lk] = 8552                           (: 'else' '(' :)
          or $state[$p:lk] = 8553                           (: 'empty' '(' :)
          or $state[$p:lk] = 8556                           (: 'end' '(' :)
          or $state[$p:lk] = 8557                           (: 'eq' '(' :)
          or $state[$p:lk] = 8558                           (: 'every' '(' :)
          or $state[$p:lk] = 8559                           (: 'except' '(' :)
          or $state[$p:lk] = 8561                           (: 'following' '(' :)
          or $state[$p:lk] = 8562                           (: 'following-sibling' '(' :)
          or $state[$p:lk] = 8563                           (: 'for' '(' :)
          or $state[$p:lk] = 8565                           (: 'ge' '(' :)
          or $state[$p:lk] = 8567                           (: 'group' '(' :)
          or $state[$p:lk] = 8569                           (: 'gt' '(' :)
          or $state[$p:lk] = 8570                           (: 'idiv' '(' :)
          or $state[$p:lk] = 8572                           (: 'import' '(' :)
          or $state[$p:lk] = 8576                           (: 'instance' '(' :)
          or $state[$p:lk] = 8577                           (: 'intersect' '(' :)
          or $state[$p:lk] = 8578                           (: 'is' '(' :)
          or $state[$p:lk] = 8581                           (: 'le' '(' :)
          or $state[$p:lk] = 8583                           (: 'let' '(' :)
          or $state[$p:lk] = 8584                           (: 'lt' '(' :)
          or $state[$p:lk] = 8586                           (: 'mod' '(' :)
          or $state[$p:lk] = 8587                           (: 'module' '(' :)
          or $state[$p:lk] = 8588                           (: 'namespace' '(' :)
          or $state[$p:lk] = 8590                           (: 'ne' '(' :)
          or $state[$p:lk] = 8596                           (: 'only' '(' :)
          or $state[$p:lk] = 8598                           (: 'or' '(' :)
          or $state[$p:lk] = 8599                           (: 'order' '(' :)
          or $state[$p:lk] = 8600                           (: 'ordered' '(' :)
          or $state[$p:lk] = 8602                           (: 'parent' '(' :)
          or $state[$p:lk] = 8606                           (: 'preceding' '(' :)
          or $state[$p:lk] = 8607                           (: 'preceding-sibling' '(' :)
          or $state[$p:lk] = 8611                           (: 'return' '(' :)
          or $state[$p:lk] = 8612                           (: 'satisfies' '(' :)
          or $state[$p:lk] = 8616                           (: 'self' '(' :)
          or $state[$p:lk] = 8618                           (: 'some' '(' :)
          or $state[$p:lk] = 8619                           (: 'stable' '(' :)
          or $state[$p:lk] = 8620                           (: 'start' '(' :)
          or $state[$p:lk] = 8626                           (: 'to' '(' :)
          or $state[$p:lk] = 8627                           (: 'treat' '(' :)
          or $state[$p:lk] = 8628                           (: 'try' '(' :)
          or $state[$p:lk] = 8632                           (: 'union' '(' :)
          or $state[$p:lk] = 8633                           (: 'unordered' '(' :)
          or $state[$p:lk] = 8634                           (: 'validate' '(' :)
          or $state[$p:lk] = 8638                           (: 'where' '(' :)
          or $state[$p:lk] = 8640) then                     (: 'xquery' '(' :)
      let $state := p:parse-FunctionCall($input, $state)
      return $state
    else if ($state[$p:lk] = 49816) then                    (: 'ordered' '{' :)
      let $state := p:parse-OrderedExpr($input, $state)
      return $state
    else if ($state[$p:lk] = 49849) then                    (: 'unordered' '{' :)
      let $state := p:parse-UnorderedExpr($input, $state)
      return $state
    else if ($state[$p:lk] = 102                            (: 'document-node' :)
          or $state[$p:lk] = 106                            (: 'empty-sequence' :)
          or $state[$p:lk] = 116                            (: 'function' :)
          or $state[$p:lk] = 123                            (: 'if' :)
          or $state[$p:lk] = 131                            (: 'item' :)
          or $state[$p:lk] = 141                            (: 'namespace-node' :)
          or $state[$p:lk] = 146                            (: 'node' :)
          or $state[$p:lk] = 166                            (: 'schema-attribute' :)
          or $state[$p:lk] = 167                            (: 'schema-element' :)
          or $state[$p:lk] = 175                            (: 'switch' :)
          or $state[$p:lk] = 183                            (: 'typeswitch' :)
          or $state[$p:lk] = 7175                           (: EQName^Token '#' :)
          or $state[$p:lk] = 7239                           (: 'ancestor' '#' :)
          or $state[$p:lk] = 7240                           (: 'ancestor-or-self' '#' :)
          or $state[$p:lk] = 7241                           (: 'and' '#' :)
          or $state[$p:lk] = 7243                           (: 'ascending' '#' :)
          or $state[$p:lk] = 7245                           (: 'attribute' '#' :)
          or $state[$p:lk] = 7249                           (: 'case' '#' :)
          or $state[$p:lk] = 7250                           (: 'cast' '#' :)
          or $state[$p:lk] = 7251                           (: 'castable' '#' :)
          or $state[$p:lk] = 7253                           (: 'child' '#' :)
          or $state[$p:lk] = 7254                           (: 'collation' '#' :)
          or $state[$p:lk] = 7255                           (: 'comment' '#' :)
          or $state[$p:lk] = 7259                           (: 'count' '#' :)
          or $state[$p:lk] = 7262                           (: 'declare' '#' :)
          or $state[$p:lk] = 7263                           (: 'default' '#' :)
          or $state[$p:lk] = 7264                           (: 'descendant' '#' :)
          or $state[$p:lk] = 7265                           (: 'descendant-or-self' '#' :)
          or $state[$p:lk] = 7266                           (: 'descending' '#' :)
          or $state[$p:lk] = 7268                           (: 'div' '#' :)
          or $state[$p:lk] = 7269                           (: 'document' '#' :)
          or $state[$p:lk] = 7271                           (: 'element' '#' :)
          or $state[$p:lk] = 7272                           (: 'else' '#' :)
          or $state[$p:lk] = 7273                           (: 'empty' '#' :)
          or $state[$p:lk] = 7276                           (: 'end' '#' :)
          or $state[$p:lk] = 7277                           (: 'eq' '#' :)
          or $state[$p:lk] = 7278                           (: 'every' '#' :)
          or $state[$p:lk] = 7279                           (: 'except' '#' :)
          or $state[$p:lk] = 7281                           (: 'following' '#' :)
          or $state[$p:lk] = 7282                           (: 'following-sibling' '#' :)
          or $state[$p:lk] = 7283                           (: 'for' '#' :)
          or $state[$p:lk] = 7285                           (: 'ge' '#' :)
          or $state[$p:lk] = 7287                           (: 'group' '#' :)
          or $state[$p:lk] = 7289                           (: 'gt' '#' :)
          or $state[$p:lk] = 7290                           (: 'idiv' '#' :)
          or $state[$p:lk] = 7292                           (: 'import' '#' :)
          or $state[$p:lk] = 7296                           (: 'instance' '#' :)
          or $state[$p:lk] = 7297                           (: 'intersect' '#' :)
          or $state[$p:lk] = 7298                           (: 'is' '#' :)
          or $state[$p:lk] = 7301                           (: 'le' '#' :)
          or $state[$p:lk] = 7303                           (: 'let' '#' :)
          or $state[$p:lk] = 7304                           (: 'lt' '#' :)
          or $state[$p:lk] = 7306                           (: 'mod' '#' :)
          or $state[$p:lk] = 7307                           (: 'module' '#' :)
          or $state[$p:lk] = 7308                           (: 'namespace' '#' :)
          or $state[$p:lk] = 7310                           (: 'ne' '#' :)
          or $state[$p:lk] = 7316                           (: 'only' '#' :)
          or $state[$p:lk] = 7318                           (: 'or' '#' :)
          or $state[$p:lk] = 7319                           (: 'order' '#' :)
          or $state[$p:lk] = 7320                           (: 'ordered' '#' :)
          or $state[$p:lk] = 7322                           (: 'parent' '#' :)
          or $state[$p:lk] = 7326                           (: 'preceding' '#' :)
          or $state[$p:lk] = 7327                           (: 'preceding-sibling' '#' :)
          or $state[$p:lk] = 7330                           (: 'processing-instruction' '#' :)
          or $state[$p:lk] = 7331                           (: 'return' '#' :)
          or $state[$p:lk] = 7332                           (: 'satisfies' '#' :)
          or $state[$p:lk] = 7336                           (: 'self' '#' :)
          or $state[$p:lk] = 7338                           (: 'some' '#' :)
          or $state[$p:lk] = 7339                           (: 'stable' '#' :)
          or $state[$p:lk] = 7340                           (: 'start' '#' :)
          or $state[$p:lk] = 7344                           (: 'text' '#' :)
          or $state[$p:lk] = 7346                           (: 'to' '#' :)
          or $state[$p:lk] = 7347                           (: 'treat' '#' :)
          or $state[$p:lk] = 7348                           (: 'try' '#' :)
          or $state[$p:lk] = 7352                           (: 'union' '#' :)
          or $state[$p:lk] = 7353                           (: 'unordered' '#' :)
          or $state[$p:lk] = 7354                           (: 'validate' '#' :)
          or $state[$p:lk] = 7358                           (: 'where' '#' :)
          or $state[$p:lk] = 7360) then                     (: 'xquery' '#' :)
      let $state := p:parse-FunctionItemExpr($input, $state)
      return $state
    else if ($state[$p:error]) then
      $state
    else
      let $state := p:parse-Constructor($input, $state)
      return $state
  return p:reduce($state, "PrimaryExpr", $count)
};

(:~
 : Parse the 1st loop of production PostfixExpr (zero or more). Use
 : tail recursion for iteratively updating the parser state.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-PostfixExpr-1($input as xs:string, $state as item()+) as item()+
{
  if ($state[$p:error]) then
    $state
  else
    let $state := p:lookahead1W(189, $input, $state)        (: EOF | S^WS | '!=' | '(' | ('(' ':') | ')' | '*' | '+' |
                                                               ',' | '-' | '/' | '//' | ';' | '<' | '<<' | '<=' | '=' |
                                                               '>' | '>=' | '>>' | '[' | ']' | 'and' | 'ascending' |
                                                               'case' | 'cast' | 'castable' | 'collation' | 'count' |
                                                               'default' | 'descending' | 'div' | 'else' | 'empty' |
                                                               'end' | 'eq' | 'except' | 'for' | 'ge' | 'group' | 'gt' |
                                                               'idiv' | 'instance' | 'intersect' | 'is' | 'le' | 'let' |
                                                               'lt' | 'mod' | 'ne' | 'only' | 'or' | 'order' |
                                                               'return' | 'satisfies' | 'stable' | 'start' | 'to' |
                                                               'treat' | 'union' | 'where' | '|' | '}' :)
    return
      if ($state[$p:l1] != 33                               (: '(' :)
      and $state[$p:l1] != 67) then                         (: '[' :)
        $state
      else
        let $state :=
          if ($state[$p:l1] = 67) then                      (: '[' :)
            let $state := p:parse-Predicate($input, $state)
            return $state
          else if ($state[$p:error]) then
            $state
          else
            let $state := p:parse-ArgumentList($input, $state)
            return $state
        return p:parse-PostfixExpr-1($input, $state)
};

(:~
 : Parse PostfixExpr.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-PostfixExpr($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:parse-PrimaryExpr($input, $state)
  let $state := p:parse-PostfixExpr-1($input, $state)
  return p:reduce($state, "PostfixExpr", $count)
};

(:~
 : Parse StepExpr.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-StepExpr($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:lookahead1W(215, $input, $state)          (: Wildcard | EQName^Token | IntegerLiteral |
                                                               DecimalLiteral | DoubleLiteral | StringLiteral | S^WS |
                                                               '$' | '(' | ('(' ':') | '.' | '..' | '<' | '<!--' |
                                                               '<?' | '@' | 'ancestor' | 'ancestor-or-self' | 'and' |
                                                               'ascending' | 'attribute' | 'case' | 'cast' |
                                                               'castable' | 'child' | 'collation' | 'comment' |
                                                               'count' | 'declare' | 'default' | 'descendant' |
                                                               'descendant-or-self' | 'descending' | 'div' |
                                                               'document' | 'document-node' | 'element' | 'else' |
                                                               'empty' | 'empty-sequence' | 'end' | 'eq' | 'every' |
                                                               'except' | 'following' | 'following-sibling' | 'for' |
                                                               'function' | 'ge' | 'group' | 'gt' | 'idiv' | 'if' |
                                                               'import' | 'instance' | 'intersect' | 'is' | 'item' |
                                                               'le' | 'let' | 'lt' | 'mod' | 'module' | 'namespace' |
                                                               'namespace-node' | 'ne' | 'node' | 'only' | 'or' |
                                                               'order' | 'ordered' | 'parent' | 'preceding' |
                                                               'preceding-sibling' | 'processing-instruction' |
                                                               'return' | 'satisfies' | 'schema-attribute' |
                                                               'schema-element' | 'self' | 'some' | 'stable' | 'start' |
                                                               'switch' | 'text' | 'to' | 'treat' | 'try' |
                                                               'typeswitch' | 'union' | 'unordered' | 'validate' |
                                                               'where' | 'xquery' :)
  let $state :=
    if ($state[$p:l1] = 77) then                            (: 'attribute' :)
      let $state := p:lookahead2W(225, $input, $state)      (: EOF | EQName^Token | S^WS | '!=' | '#' | '(' |
                                                               ('(' ':') | ')' | '*' | '+' | ',' | '-' | '/' | '//' |
                                                               '::' | ';' | '<' | '<<' | '<=' | '=' | '>' | '>=' |
                                                               '>>' | '[' | ']' | 'ancestor' | 'ancestor-or-self' |
                                                               'and' | 'ascending' | 'attribute' | 'case' | 'cast' |
                                                               'castable' | 'child' | 'collation' | 'comment' |
                                                               'count' | 'declare' | 'default' | 'descendant' |
                                                               'descendant-or-self' | 'descending' | 'div' |
                                                               'document' | 'document-node' | 'element' | 'else' |
                                                               'empty' | 'empty-sequence' | 'end' | 'eq' | 'every' |
                                                               'except' | 'following' | 'following-sibling' | 'for' |
                                                               'function' | 'ge' | 'group' | 'gt' | 'idiv' | 'if' |
                                                               'import' | 'instance' | 'intersect' | 'is' | 'item' |
                                                               'le' | 'let' | 'lt' | 'mod' | 'module' | 'namespace' |
                                                               'namespace-node' | 'ne' | 'node' | 'only' | 'or' |
                                                               'order' | 'ordered' | 'parent' | 'preceding' |
                                                               'preceding-sibling' | 'processing-instruction' |
                                                               'return' | 'satisfies' | 'schema-attribute' |
                                                               'schema-element' | 'self' | 'some' | 'stable' | 'start' |
                                                               'switch' | 'text' | 'to' | 'treat' | 'try' |
                                                               'typeswitch' | 'union' | 'unordered' | 'validate' |
                                                               'where' | 'xquery' | '{' | '|' | '}' :)
      let $state :=
        if ($state[$p:lk] = 20813) then                     (: 'attribute' 'case' :)
          let $state := p:lookahead3W(222, $input, $state)  (: Wildcard | EQName^Token | IntegerLiteral |
                                                               DecimalLiteral | DoubleLiteral | StringLiteral | S^WS |
                                                               '$' | '%' | '(' | '(#' | ('(' ':') | '+' | '-' | '.' |
                                                               '..' | '/' | '//' | '<' | '<!--' | '<?' | '@' |
                                                               'ancestor' | 'ancestor-or-self' | 'and' | 'ascending' |
                                                               'attribute' | 'case' | 'cast' | 'castable' | 'child' |
                                                               'collation' | 'comment' | 'count' | 'declare' |
                                                               'default' | 'descendant' | 'descendant-or-self' |
                                                               'descending' | 'div' | 'document' | 'document-node' |
                                                               'element' | 'else' | 'empty' | 'empty-sequence' | 'end' |
                                                               'eq' | 'every' | 'except' | 'following' |
                                                               'following-sibling' | 'for' | 'function' | 'ge' |
                                                               'group' | 'gt' | 'idiv' | 'if' | 'import' | 'instance' |
                                                               'intersect' | 'is' | 'item' | 'le' | 'let' | 'lt' |
                                                               'mod' | 'module' | 'namespace' | 'namespace-node' |
                                                               'ne' | 'node' | 'only' | 'or' | 'order' | 'ordered' |
                                                               'parent' | 'preceding' | 'preceding-sibling' |
                                                               'processing-instruction' | 'return' | 'satisfies' |
                                                               'schema-attribute' | 'schema-element' | 'self' | 'some' |
                                                               'stable' | 'start' | 'switch' | 'text' | 'to' | 'treat' |
                                                               'try' | 'typeswitch' | 'union' | 'unordered' |
                                                               'validate' | 'where' | 'xquery' | '{' :)
          return $state
        else if ($state[$p:lk] = 22093) then                (: 'attribute' 'collation' :)
          let $state := p:lookahead3W(81, $input, $state)   (: URILiteral | S^WS | ('(' ':') | '{' :)
          return $state
        else if ($state[$p:lk] = 24397) then                (: 'attribute' 'default' :)
          let $state := p:lookahead3W(126, $input, $state)  (: S^WS | '$' | ('(' ':') | 'return' | '{' :)
          return $state
        else if ($state[$p:lk] = 26957) then                (: 'attribute' 'empty' :)
          let $state := p:lookahead3W(135, $input, $state)  (: S^WS | ('(' ':') | 'greatest' | 'least' | '{' :)
          return $state
        else if ($state[$p:lk] = 29517) then                (: 'attribute' 'for' :)
          let $state := p:lookahead3W(138, $input, $state)  (: S^WS | '$' | ('(' ':') | 'sliding' | 'tumbling' | '{' :)
          return $state
        else if ($state[$p:lk] = 32845) then                (: 'attribute' 'instance' :)
          let $state := p:lookahead3W(117, $input, $state)  (: S^WS | ('(' ':') | 'of' | '{' :)
          return $state
        else if ($state[$p:lk] = 37965) then                (: 'attribute' 'only' :)
          let $state := p:lookahead3W(110, $input, $state)  (: S^WS | ('(' ':') | 'end' | '{' :)
          return $state
        else if ($state[$p:lk] = 43853) then                (: 'attribute' 'stable' :)
          let $state := p:lookahead3W(118, $input, $state)  (: S^WS | ('(' ':') | 'order' | '{' :)
          return $state
        else if ($state[$p:lk] = 19277                      (: 'attribute' 'descending' :)
              or $state[$p:lk] = 25165) then                (: 'attribute' 'descending' :)
          let $state := p:lookahead3W(159, $input, $state)  (: S^WS | ('(' ':') | ',' | 'collation' | 'count' |
                                                               'empty' | 'for' | 'group' | 'let' | 'order' | 'return' |
                                                               'stable' | 'where' | '{' :)
          return $state
        else if ($state[$p:lk] = 23373                      (: 'attribute' 'let' :)
              or $state[$p:lk] = 34637) then                (: 'attribute' 'let' :)
          let $state := p:lookahead3W(88, $input, $state)   (: S^WS | '$' | ('(' ':') | '{' :)
          return $state
        else if ($state[$p:lk] = 27725                      (: 'attribute' 'start' :)
              or $state[$p:lk] = 44109) then                (: 'attribute' 'start' :)
          let $state := p:lookahead3W(149, $input, $state)  (: S^WS | '$' | ('(' ':') | 'at' | 'next' | 'previous' |
                                                               'when' | '{' :)
          return $state
        else if ($state[$p:lk] = 30541                      (: 'attribute' 'order' :)
              or $state[$p:lk] = 38733) then                (: 'attribute' 'order' :)
          let $state := p:lookahead3W(103, $input, $state)  (: S^WS | ('(' ':') | 'by' | '{' :)
          return $state
        else if ($state[$p:lk] = 21069                      (: 'attribute' 'castable' :)
              or $state[$p:lk] = 21325                      (: 'attribute' 'treat' :)
              or $state[$p:lk] = 45901) then                (: 'attribute' 'treat' :)
          let $state := p:lookahead3W(101, $input, $state)  (: S^WS | ('(' ':') | 'as' | '{' :)
          return $state
        else if ($state[$p:lk] = 18765                      (: 'attribute' 'div' :)
              or $state[$p:lk] = 25677                      (: 'attribute' 'else' :)
              or $state[$p:lk] = 26701                      (: 'attribute' 'eq' :)
              or $state[$p:lk] = 27981                      (: 'attribute' 'except' :)
              or $state[$p:lk] = 28493                      (: 'attribute' 'ge' :)
              or $state[$p:lk] = 30029                      (: 'attribute' 'gt' :)
              or $state[$p:lk] = 31053                      (: 'attribute' 'idiv' :)
              or $state[$p:lk] = 31309                      (: 'attribute' 'intersect' :)
              or $state[$p:lk] = 33101                      (: 'attribute' 'is' :)
              or $state[$p:lk] = 33357                      (: 'attribute' 'le' :)
              or $state[$p:lk] = 34125                      (: 'attribute' 'lt' :)
              or $state[$p:lk] = 34893                      (: 'attribute' 'mod' :)
              or $state[$p:lk] = 35405                      (: 'attribute' 'ne' :)
              or $state[$p:lk] = 36429                      (: 'attribute' 'or' :)
              or $state[$p:lk] = 38477                      (: 'attribute' 'return' :)
              or $state[$p:lk] = 41805                      (: 'attribute' 'satisfies' :)
              or $state[$p:lk] = 42061                      (: 'attribute' 'to' :)
              or $state[$p:lk] = 45645                      (: 'attribute' 'union' :)
              or $state[$p:lk] = 47181                      (: 'attribute' 'where' :)
              or $state[$p:lk] = 48717) then                (: 'attribute' 'where' :)
          let $state := p:lookahead3W(220, $input, $state)  (: Wildcard | EQName^Token | IntegerLiteral |
                                                               DecimalLiteral | DoubleLiteral | StringLiteral | S^WS |
                                                               '$' | '(' | '(#' | ('(' ':') | '+' | '-' | '.' | '..' |
                                                               '/' | '//' | '<' | '<!--' | '<?' | '@' | 'ancestor' |
                                                               'ancestor-or-self' | 'and' | 'ascending' | 'attribute' |
                                                               'case' | 'cast' | 'castable' | 'child' | 'collation' |
                                                               'comment' | 'count' | 'declare' | 'default' |
                                                               'descendant' | 'descendant-or-self' | 'descending' |
                                                               'div' | 'document' | 'document-node' | 'element' |
                                                               'else' | 'empty' | 'empty-sequence' | 'end' | 'eq' |
                                                               'every' | 'except' | 'following' | 'following-sibling' |
                                                               'for' | 'function' | 'ge' | 'group' | 'gt' | 'idiv' |
                                                               'if' | 'import' | 'instance' | 'intersect' | 'is' |
                                                               'item' | 'le' | 'let' | 'lt' | 'mod' | 'module' |
                                                               'namespace' | 'namespace-node' | 'ne' | 'node' | 'only' |
                                                               'or' | 'order' | 'ordered' | 'parent' | 'preceding' |
                                                               'preceding-sibling' | 'processing-instruction' |
                                                               'return' | 'satisfies' | 'schema-attribute' |
                                                               'schema-element' | 'self' | 'some' | 'stable' | 'start' |
                                                               'switch' | 'text' | 'to' | 'treat' | 'try' |
                                                               'typeswitch' | 'union' | 'unordered' | 'validate' |
                                                               'where' | 'xquery' | '{' :)
          return $state
        else
          $state
      return $state
    else if ($state[$p:l1] = 103) then                      (: 'element' :)
      let $state := p:lookahead2W(224, $input, $state)      (: EOF | EQName^Token | S^WS | '!=' | '#' | '(' |
                                                               ('(' ':') | ')' | '*' | '+' | ',' | '-' | '/' | '//' |
                                                               ';' | '<' | '<<' | '<=' | '=' | '>' | '>=' | '>>' | '[' |
                                                               ']' | 'ancestor' | 'ancestor-or-self' | 'and' |
                                                               'ascending' | 'attribute' | 'case' | 'cast' |
                                                               'castable' | 'child' | 'collation' | 'comment' |
                                                               'count' | 'declare' | 'default' | 'descendant' |
                                                               'descendant-or-self' | 'descending' | 'div' |
                                                               'document' | 'document-node' | 'element' | 'else' |
                                                               'empty' | 'empty-sequence' | 'end' | 'eq' | 'every' |
                                                               'except' | 'following' | 'following-sibling' | 'for' |
                                                               'function' | 'ge' | 'group' | 'gt' | 'idiv' | 'if' |
                                                               'import' | 'instance' | 'intersect' | 'is' | 'item' |
                                                               'le' | 'let' | 'lt' | 'mod' | 'module' | 'namespace' |
                                                               'namespace-node' | 'ne' | 'node' | 'only' | 'or' |
                                                               'order' | 'ordered' | 'parent' | 'preceding' |
                                                               'preceding-sibling' | 'processing-instruction' |
                                                               'return' | 'satisfies' | 'schema-attribute' |
                                                               'schema-element' | 'self' | 'some' | 'stable' | 'start' |
                                                               'switch' | 'text' | 'to' | 'treat' | 'try' |
                                                               'typeswitch' | 'union' | 'unordered' | 'validate' |
                                                               'where' | 'xquery' | '{' | '|' | '}' :)
      let $state :=
        if ($state[$p:lk] = 20839) then                     (: 'element' 'case' :)
          let $state := p:lookahead3W(222, $input, $state)  (: Wildcard | EQName^Token | IntegerLiteral |
                                                               DecimalLiteral | DoubleLiteral | StringLiteral | S^WS |
                                                               '$' | '%' | '(' | '(#' | ('(' ':') | '+' | '-' | '.' |
                                                               '..' | '/' | '//' | '<' | '<!--' | '<?' | '@' |
                                                               'ancestor' | 'ancestor-or-self' | 'and' | 'ascending' |
                                                               'attribute' | 'case' | 'cast' | 'castable' | 'child' |
                                                               'collation' | 'comment' | 'count' | 'declare' |
                                                               'default' | 'descendant' | 'descendant-or-self' |
                                                               'descending' | 'div' | 'document' | 'document-node' |
                                                               'element' | 'else' | 'empty' | 'empty-sequence' | 'end' |
                                                               'eq' | 'every' | 'except' | 'following' |
                                                               'following-sibling' | 'for' | 'function' | 'ge' |
                                                               'group' | 'gt' | 'idiv' | 'if' | 'import' | 'instance' |
                                                               'intersect' | 'is' | 'item' | 'le' | 'let' | 'lt' |
                                                               'mod' | 'module' | 'namespace' | 'namespace-node' |
                                                               'ne' | 'node' | 'only' | 'or' | 'order' | 'ordered' |
                                                               'parent' | 'preceding' | 'preceding-sibling' |
                                                               'processing-instruction' | 'return' | 'satisfies' |
                                                               'schema-attribute' | 'schema-element' | 'self' | 'some' |
                                                               'stable' | 'start' | 'switch' | 'text' | 'to' | 'treat' |
                                                               'try' | 'typeswitch' | 'union' | 'unordered' |
                                                               'validate' | 'where' | 'xquery' | '{' :)
          return $state
        else if ($state[$p:lk] = 22119) then                (: 'element' 'collation' :)
          let $state := p:lookahead3W(81, $input, $state)   (: URILiteral | S^WS | ('(' ':') | '{' :)
          return $state
        else if ($state[$p:lk] = 24423) then                (: 'element' 'default' :)
          let $state := p:lookahead3W(126, $input, $state)  (: S^WS | '$' | ('(' ':') | 'return' | '{' :)
          return $state
        else if ($state[$p:lk] = 26983) then                (: 'element' 'empty' :)
          let $state := p:lookahead3W(135, $input, $state)  (: S^WS | ('(' ':') | 'greatest' | 'least' | '{' :)
          return $state
        else if ($state[$p:lk] = 29543) then                (: 'element' 'for' :)
          let $state := p:lookahead3W(138, $input, $state)  (: S^WS | '$' | ('(' ':') | 'sliding' | 'tumbling' | '{' :)
          return $state
        else if ($state[$p:lk] = 32871) then                (: 'element' 'instance' :)
          let $state := p:lookahead3W(117, $input, $state)  (: S^WS | ('(' ':') | 'of' | '{' :)
          return $state
        else if ($state[$p:lk] = 37991) then                (: 'element' 'only' :)
          let $state := p:lookahead3W(110, $input, $state)  (: S^WS | ('(' ':') | 'end' | '{' :)
          return $state
        else if ($state[$p:lk] = 43879) then                (: 'element' 'stable' :)
          let $state := p:lookahead3W(118, $input, $state)  (: S^WS | ('(' ':') | 'order' | '{' :)
          return $state
        else if ($state[$p:lk] = 19303                      (: 'element' 'descending' :)
              or $state[$p:lk] = 25191) then                (: 'element' 'descending' :)
          let $state := p:lookahead3W(159, $input, $state)  (: S^WS | ('(' ':') | ',' | 'collation' | 'count' |
                                                               'empty' | 'for' | 'group' | 'let' | 'order' | 'return' |
                                                               'stable' | 'where' | '{' :)
          return $state
        else if ($state[$p:lk] = 23399                      (: 'element' 'let' :)
              or $state[$p:lk] = 34663) then                (: 'element' 'let' :)
          let $state := p:lookahead3W(88, $input, $state)   (: S^WS | '$' | ('(' ':') | '{' :)
          return $state
        else if ($state[$p:lk] = 27751                      (: 'element' 'start' :)
              or $state[$p:lk] = 44135) then                (: 'element' 'start' :)
          let $state := p:lookahead3W(149, $input, $state)  (: S^WS | '$' | ('(' ':') | 'at' | 'next' | 'previous' |
                                                               'when' | '{' :)
          return $state
        else if ($state[$p:lk] = 30567                      (: 'element' 'order' :)
              or $state[$p:lk] = 38759) then                (: 'element' 'order' :)
          let $state := p:lookahead3W(103, $input, $state)  (: S^WS | ('(' ':') | 'by' | '{' :)
          return $state
        else if ($state[$p:lk] = 21095                      (: 'element' 'castable' :)
              or $state[$p:lk] = 21351                      (: 'element' 'treat' :)
              or $state[$p:lk] = 45927) then                (: 'element' 'treat' :)
          let $state := p:lookahead3W(101, $input, $state)  (: S^WS | ('(' ':') | 'as' | '{' :)
          return $state
        else if ($state[$p:lk] = 18791                      (: 'element' 'div' :)
              or $state[$p:lk] = 25703                      (: 'element' 'else' :)
              or $state[$p:lk] = 26727                      (: 'element' 'eq' :)
              or $state[$p:lk] = 28007                      (: 'element' 'except' :)
              or $state[$p:lk] = 28519                      (: 'element' 'ge' :)
              or $state[$p:lk] = 30055                      (: 'element' 'gt' :)
              or $state[$p:lk] = 31079                      (: 'element' 'idiv' :)
              or $state[$p:lk] = 31335                      (: 'element' 'intersect' :)
              or $state[$p:lk] = 33127                      (: 'element' 'is' :)
              or $state[$p:lk] = 33383                      (: 'element' 'le' :)
              or $state[$p:lk] = 34151                      (: 'element' 'lt' :)
              or $state[$p:lk] = 34919                      (: 'element' 'mod' :)
              or $state[$p:lk] = 35431                      (: 'element' 'ne' :)
              or $state[$p:lk] = 36455                      (: 'element' 'or' :)
              or $state[$p:lk] = 38503                      (: 'element' 'return' :)
              or $state[$p:lk] = 41831                      (: 'element' 'satisfies' :)
              or $state[$p:lk] = 42087                      (: 'element' 'to' :)
              or $state[$p:lk] = 45671                      (: 'element' 'union' :)
              or $state[$p:lk] = 47207                      (: 'element' 'where' :)
              or $state[$p:lk] = 48743) then                (: 'element' 'where' :)
          let $state := p:lookahead3W(220, $input, $state)  (: Wildcard | EQName^Token | IntegerLiteral |
                                                               DecimalLiteral | DoubleLiteral | StringLiteral | S^WS |
                                                               '$' | '(' | '(#' | ('(' ':') | '+' | '-' | '.' | '..' |
                                                               '/' | '//' | '<' | '<!--' | '<?' | '@' | 'ancestor' |
                                                               'ancestor-or-self' | 'and' | 'ascending' | 'attribute' |
                                                               'case' | 'cast' | 'castable' | 'child' | 'collation' |
                                                               'comment' | 'count' | 'declare' | 'default' |
                                                               'descendant' | 'descendant-or-self' | 'descending' |
                                                               'div' | 'document' | 'document-node' | 'element' |
                                                               'else' | 'empty' | 'empty-sequence' | 'end' | 'eq' |
                                                               'every' | 'except' | 'following' | 'following-sibling' |
                                                               'for' | 'function' | 'ge' | 'group' | 'gt' | 'idiv' |
                                                               'if' | 'import' | 'instance' | 'intersect' | 'is' |
                                                               'item' | 'le' | 'let' | 'lt' | 'mod' | 'module' |
                                                               'namespace' | 'namespace-node' | 'ne' | 'node' | 'only' |
                                                               'or' | 'order' | 'ordered' | 'parent' | 'preceding' |
                                                               'preceding-sibling' | 'processing-instruction' |
                                                               'return' | 'satisfies' | 'schema-attribute' |
                                                               'schema-element' | 'self' | 'some' | 'stable' | 'start' |
                                                               'switch' | 'text' | 'to' | 'treat' | 'try' |
                                                               'typeswitch' | 'union' | 'unordered' | 'validate' |
                                                               'where' | 'xquery' | '{' :)
          return $state
        else
          $state
      return $state
    else if ($state[$p:l1] = 140                            (: 'processing-instruction' :)
          or $state[$p:l1] = 162) then                      (: 'processing-instruction' :)
      let $state := p:lookahead2W(199, $input, $state)      (: EOF | NCName^Token | S^WS | '!=' | '#' | '(' |
                                                               ('(' ':') | ')' | '*' | '+' | ',' | '-' | '/' | '//' |
                                                               ';' | '<' | '<<' | '<=' | '=' | '>' | '>=' | '>>' | '[' |
                                                               ']' | 'and' | 'ascending' | 'case' | 'cast' |
                                                               'castable' | 'collation' | 'count' | 'default' |
                                                               'descending' | 'div' | 'else' | 'empty' | 'end' | 'eq' |
                                                               'except' | 'for' | 'ge' | 'group' | 'gt' | 'idiv' |
                                                               'instance' | 'intersect' | 'is' | 'le' | 'let' | 'lt' |
                                                               'mod' | 'ne' | 'only' | 'or' | 'order' | 'return' |
                                                               'satisfies' | 'stable' | 'start' | 'to' | 'treat' |
                                                               'union' | 'where' | '{' | '|' | '}' :)
      let $state :=
        if ($state[$p:lk] = 20876                           (: 'processing-instruction' 'case' :)
         or $state[$p:lk] = 20898) then                     (: 'processing-instruction' 'case' :)
          let $state := p:lookahead3W(222, $input, $state)  (: Wildcard | EQName^Token | IntegerLiteral |
                                                               DecimalLiteral | DoubleLiteral | StringLiteral | S^WS |
                                                               '$' | '%' | '(' | '(#' | ('(' ':') | '+' | '-' | '.' |
                                                               '..' | '/' | '//' | '<' | '<!--' | '<?' | '@' |
                                                               'ancestor' | 'ancestor-or-self' | 'and' | 'ascending' |
                                                               'attribute' | 'case' | 'cast' | 'castable' | 'child' |
                                                               'collation' | 'comment' | 'count' | 'declare' |
                                                               'default' | 'descendant' | 'descendant-or-self' |
                                                               'descending' | 'div' | 'document' | 'document-node' |
                                                               'element' | 'else' | 'empty' | 'empty-sequence' | 'end' |
                                                               'eq' | 'every' | 'except' | 'following' |
                                                               'following-sibling' | 'for' | 'function' | 'ge' |
                                                               'group' | 'gt' | 'idiv' | 'if' | 'import' | 'instance' |
                                                               'intersect' | 'is' | 'item' | 'le' | 'let' | 'lt' |
                                                               'mod' | 'module' | 'namespace' | 'namespace-node' |
                                                               'ne' | 'node' | 'only' | 'or' | 'order' | 'ordered' |
                                                               'parent' | 'preceding' | 'preceding-sibling' |
                                                               'processing-instruction' | 'return' | 'satisfies' |
                                                               'schema-attribute' | 'schema-element' | 'self' | 'some' |
                                                               'stable' | 'start' | 'switch' | 'text' | 'to' | 'treat' |
                                                               'try' | 'typeswitch' | 'union' | 'unordered' |
                                                               'validate' | 'where' | 'xquery' | '{' :)
          return $state
        else if ($state[$p:lk] = 22156                      (: 'processing-instruction' 'collation' :)
              or $state[$p:lk] = 22178) then                (: 'processing-instruction' 'collation' :)
          let $state := p:lookahead3W(81, $input, $state)   (: URILiteral | S^WS | ('(' ':') | '{' :)
          return $state
        else if ($state[$p:lk] = 24460                      (: 'processing-instruction' 'default' :)
              or $state[$p:lk] = 24482) then                (: 'processing-instruction' 'default' :)
          let $state := p:lookahead3W(126, $input, $state)  (: S^WS | '$' | ('(' ':') | 'return' | '{' :)
          return $state
        else if ($state[$p:lk] = 27020                      (: 'processing-instruction' 'empty' :)
              or $state[$p:lk] = 27042) then                (: 'processing-instruction' 'empty' :)
          let $state := p:lookahead3W(135, $input, $state)  (: S^WS | ('(' ':') | 'greatest' | 'least' | '{' :)
          return $state
        else if ($state[$p:lk] = 29580                      (: 'processing-instruction' 'for' :)
              or $state[$p:lk] = 29602) then                (: 'processing-instruction' 'for' :)
          let $state := p:lookahead3W(138, $input, $state)  (: S^WS | '$' | ('(' ':') | 'sliding' | 'tumbling' | '{' :)
          return $state
        else if ($state[$p:lk] = 32908                      (: 'processing-instruction' 'instance' :)
              or $state[$p:lk] = 32930) then                (: 'processing-instruction' 'instance' :)
          let $state := p:lookahead3W(117, $input, $state)  (: S^WS | ('(' ':') | 'of' | '{' :)
          return $state
        else if ($state[$p:lk] = 38028                      (: 'processing-instruction' 'only' :)
              or $state[$p:lk] = 38050) then                (: 'processing-instruction' 'only' :)
          let $state := p:lookahead3W(110, $input, $state)  (: S^WS | ('(' ':') | 'end' | '{' :)
          return $state
        else if ($state[$p:lk] = 43916                      (: 'processing-instruction' 'stable' :)
              or $state[$p:lk] = 43938) then                (: 'processing-instruction' 'stable' :)
          let $state := p:lookahead3W(118, $input, $state)  (: S^WS | ('(' ':') | 'order' | '{' :)
          return $state
        else if ($state[$p:lk] = 19340                      (: 'namespace' 'descending' :)
              or $state[$p:lk] = 25228                      (: 'processing-instruction' 'ascending' :)
              or $state[$p:lk] = 19362                      (: 'processing-instruction' 'descending' :)
              or $state[$p:lk] = 25250) then                (: 'processing-instruction' 'descending' :)
          let $state := p:lookahead3W(159, $input, $state)  (: S^WS | ('(' ':') | ',' | 'collation' | 'count' |
                                                               'empty' | 'for' | 'group' | 'let' | 'order' | 'return' |
                                                               'stable' | 'where' | '{' :)
          return $state
        else if ($state[$p:lk] = 23436                      (: 'namespace' 'let' :)
              or $state[$p:lk] = 34700                      (: 'processing-instruction' 'count' :)
              or $state[$p:lk] = 23458                      (: 'processing-instruction' 'let' :)
              or $state[$p:lk] = 34722) then                (: 'processing-instruction' 'let' :)
          let $state := p:lookahead3W(88, $input, $state)   (: S^WS | '$' | ('(' ':') | '{' :)
          return $state
        else if ($state[$p:lk] = 27788                      (: 'namespace' 'start' :)
              or $state[$p:lk] = 44172                      (: 'processing-instruction' 'end' :)
              or $state[$p:lk] = 27810                      (: 'processing-instruction' 'start' :)
              or $state[$p:lk] = 44194) then                (: 'processing-instruction' 'start' :)
          let $state := p:lookahead3W(149, $input, $state)  (: S^WS | '$' | ('(' ':') | 'at' | 'next' | 'previous' |
                                                               'when' | '{' :)
          return $state
        else if ($state[$p:lk] = 30604                      (: 'namespace' 'order' :)
              or $state[$p:lk] = 38796                      (: 'processing-instruction' 'group' :)
              or $state[$p:lk] = 30626                      (: 'processing-instruction' 'order' :)
              or $state[$p:lk] = 38818) then                (: 'processing-instruction' 'order' :)
          let $state := p:lookahead3W(103, $input, $state)  (: S^WS | ('(' ':') | 'by' | '{' :)
          return $state
        else if ($state[$p:lk] = 21132                      (: 'namespace' 'castable' :)
              or $state[$p:lk] = 21388                      (: 'namespace' 'treat' :)
              or $state[$p:lk] = 45964                      (: 'processing-instruction' 'cast' :)
              or $state[$p:lk] = 21154                      (: 'processing-instruction' 'castable' :)
              or $state[$p:lk] = 21410                      (: 'processing-instruction' 'treat' :)
              or $state[$p:lk] = 45986) then                (: 'processing-instruction' 'treat' :)
          let $state := p:lookahead3W(101, $input, $state)  (: S^WS | ('(' ':') | 'as' | '{' :)
          return $state
        else if ($state[$p:lk] = 18828                      (: 'namespace' 'div' :)
              or $state[$p:lk] = 25740                      (: 'namespace' 'else' :)
              or $state[$p:lk] = 26764                      (: 'namespace' 'eq' :)
              or $state[$p:lk] = 28044                      (: 'namespace' 'except' :)
              or $state[$p:lk] = 28556                      (: 'namespace' 'ge' :)
              or $state[$p:lk] = 30092                      (: 'namespace' 'gt' :)
              or $state[$p:lk] = 31116                      (: 'namespace' 'idiv' :)
              or $state[$p:lk] = 31372                      (: 'namespace' 'intersect' :)
              or $state[$p:lk] = 33164                      (: 'namespace' 'is' :)
              or $state[$p:lk] = 33420                      (: 'namespace' 'le' :)
              or $state[$p:lk] = 34188                      (: 'namespace' 'lt' :)
              or $state[$p:lk] = 34956                      (: 'namespace' 'mod' :)
              or $state[$p:lk] = 35468                      (: 'namespace' 'ne' :)
              or $state[$p:lk] = 36492                      (: 'namespace' 'or' :)
              or $state[$p:lk] = 38540                      (: 'namespace' 'return' :)
              or $state[$p:lk] = 41868                      (: 'namespace' 'satisfies' :)
              or $state[$p:lk] = 42124                      (: 'namespace' 'to' :)
              or $state[$p:lk] = 45708                      (: 'namespace' 'union' :)
              or $state[$p:lk] = 47244                      (: 'namespace' 'where' :)
              or $state[$p:lk] = 48780                      (: 'processing-instruction' 'and' :)
              or $state[$p:lk] = 18850                      (: 'processing-instruction' 'div' :)
              or $state[$p:lk] = 25762                      (: 'processing-instruction' 'else' :)
              or $state[$p:lk] = 26786                      (: 'processing-instruction' 'eq' :)
              or $state[$p:lk] = 28066                      (: 'processing-instruction' 'except' :)
              or $state[$p:lk] = 28578                      (: 'processing-instruction' 'ge' :)
              or $state[$p:lk] = 30114                      (: 'processing-instruction' 'gt' :)
              or $state[$p:lk] = 31138                      (: 'processing-instruction' 'idiv' :)
              or $state[$p:lk] = 31394                      (: 'processing-instruction' 'intersect' :)
              or $state[$p:lk] = 33186                      (: 'processing-instruction' 'is' :)
              or $state[$p:lk] = 33442                      (: 'processing-instruction' 'le' :)
              or $state[$p:lk] = 34210                      (: 'processing-instruction' 'lt' :)
              or $state[$p:lk] = 34978                      (: 'processing-instruction' 'mod' :)
              or $state[$p:lk] = 35490                      (: 'processing-instruction' 'ne' :)
              or $state[$p:lk] = 36514                      (: 'processing-instruction' 'or' :)
              or $state[$p:lk] = 38562                      (: 'processing-instruction' 'return' :)
              or $state[$p:lk] = 41890                      (: 'processing-instruction' 'satisfies' :)
              or $state[$p:lk] = 42146                      (: 'processing-instruction' 'to' :)
              or $state[$p:lk] = 45730                      (: 'processing-instruction' 'union' :)
              or $state[$p:lk] = 47266                      (: 'processing-instruction' 'where' :)
              or $state[$p:lk] = 48802) then                (: 'processing-instruction' 'where' :)
          let $state := p:lookahead3W(220, $input, $state)  (: Wildcard | EQName^Token | IntegerLiteral |
                                                               DecimalLiteral | DoubleLiteral | StringLiteral | S^WS |
                                                               '$' | '(' | '(#' | ('(' ':') | '+' | '-' | '.' | '..' |
                                                               '/' | '//' | '<' | '<!--' | '<?' | '@' | 'ancestor' |
                                                               'ancestor-or-self' | 'and' | 'ascending' | 'attribute' |
                                                               'case' | 'cast' | 'castable' | 'child' | 'collation' |
                                                               'comment' | 'count' | 'declare' | 'default' |
                                                               'descendant' | 'descendant-or-self' | 'descending' |
                                                               'div' | 'document' | 'document-node' | 'element' |
                                                               'else' | 'empty' | 'empty-sequence' | 'end' | 'eq' |
                                                               'every' | 'except' | 'following' | 'following-sibling' |
                                                               'for' | 'function' | 'ge' | 'group' | 'gt' | 'idiv' |
                                                               'if' | 'import' | 'instance' | 'intersect' | 'is' |
                                                               'item' | 'le' | 'let' | 'lt' | 'mod' | 'module' |
                                                               'namespace' | 'namespace-node' | 'ne' | 'node' | 'only' |
                                                               'or' | 'order' | 'ordered' | 'parent' | 'preceding' |
                                                               'preceding-sibling' | 'processing-instruction' |
                                                               'return' | 'satisfies' | 'schema-attribute' |
                                                               'schema-element' | 'self' | 'some' | 'stable' | 'start' |
                                                               'switch' | 'text' | 'to' | 'treat' | 'try' |
                                                               'typeswitch' | 'union' | 'unordered' | 'validate' |
                                                               'where' | 'xquery' | '{' :)
          return $state
        else
          $state
      return $state
    else if ($state[$p:l1] = 87                             (: 'document' :)
          or $state[$p:l1] = 101                            (: 'ordered' :)
          or $state[$p:l1] = 152                            (: 'text' :)
          or $state[$p:l1] = 176                            (: 'unordered' :)
          or $state[$p:l1] = 185) then                      (: 'unordered' :)
      let $state := p:lookahead2W(197, $input, $state)      (: EOF | S^WS | '!=' | '#' | '(' | ('(' ':') | ')' | '*' |
                                                               '+' | ',' | '-' | '/' | '//' | ';' | '<' | '<<' | '<=' |
                                                               '=' | '>' | '>=' | '>>' | '[' | ']' | 'and' |
                                                               'ascending' | 'case' | 'cast' | 'castable' |
                                                               'collation' | 'count' | 'default' | 'descending' |
                                                               'div' | 'else' | 'empty' | 'end' | 'eq' | 'except' |
                                                               'for' | 'ge' | 'group' | 'gt' | 'idiv' | 'instance' |
                                                               'intersect' | 'is' | 'le' | 'let' | 'lt' | 'mod' | 'ne' |
                                                               'only' | 'or' | 'order' | 'return' | 'satisfies' |
                                                               'stable' | 'start' | 'to' | 'treat' | 'union' | 'where' |
                                                               '{' | '|' | '}' :)
      return $state
    else if ($state[$p:l1] = 106                            (: 'if' :)
          or $state[$p:l1] = 123                            (: 'item' :)
          or $state[$p:l1] = 131                            (: 'switch' :)
          or $state[$p:l1] = 175                            (: 'typeswitch' :)
          or $state[$p:l1] = 183) then                      (: 'typeswitch' :)
      let $state := p:lookahead2W(188, $input, $state)      (: EOF | S^WS | '!=' | '#' | ('(' ':') | ')' | '*' | '+' |
                                                               ',' | '-' | '/' | '//' | ';' | '<' | '<<' | '<=' | '=' |
                                                               '>' | '>=' | '>>' | '[' | ']' | 'and' | 'ascending' |
                                                               'case' | 'cast' | 'castable' | 'collation' | 'count' |
                                                               'default' | 'descending' | 'div' | 'else' | 'empty' |
                                                               'end' | 'eq' | 'except' | 'for' | 'ge' | 'group' | 'gt' |
                                                               'idiv' | 'instance' | 'intersect' | 'is' | 'le' | 'let' |
                                                               'lt' | 'mod' | 'ne' | 'only' | 'or' | 'order' |
                                                               'return' | 'satisfies' | 'stable' | 'start' | 'to' |
                                                               'treat' | 'union' | 'where' | '|' | '}' :)
      return $state
    else if ($state[$p:l1] = 71                             (: 'ancestor-or-self' :)
          or $state[$p:l1] = 72                             (: 'child' :)
          or $state[$p:l1] = 85                             (: 'descendant' :)
          or $state[$p:l1] = 96                             (: 'descendant-or-self' :)
          or $state[$p:l1] = 97                             (: 'following' :)
          or $state[$p:l1] = 113                            (: 'following-sibling' :)
          or $state[$p:l1] = 114                            (: 'parent' :)
          or $state[$p:l1] = 154                            (: 'preceding' :)
          or $state[$p:l1] = 158                            (: 'preceding-sibling' :)
          or $state[$p:l1] = 159                            (: 'self' :)
          or $state[$p:l1] = 168) then                      (: 'self' :)
      let $state := p:lookahead2W(196, $input, $state)      (: EOF | S^WS | '!=' | '#' | '(' | ('(' ':') | ')' | '*' |
                                                               '+' | ',' | '-' | '/' | '//' | '::' | ';' | '<' | '<<' |
                                                               '<=' | '=' | '>' | '>=' | '>>' | '[' | ']' | 'and' |
                                                               'ascending' | 'case' | 'cast' | 'castable' |
                                                               'collation' | 'count' | 'default' | 'descending' |
                                                               'div' | 'else' | 'empty' | 'end' | 'eq' | 'except' |
                                                               'for' | 'ge' | 'group' | 'gt' | 'idiv' | 'instance' |
                                                               'intersect' | 'is' | 'le' | 'let' | 'lt' | 'mod' | 'ne' |
                                                               'only' | 'or' | 'order' | 'return' | 'satisfies' |
                                                               'stable' | 'start' | 'to' | 'treat' | 'union' | 'where' |
                                                               '|' | '}' :)
      return $state
    else if ($state[$p:l1] = 7                              (: 'and' :)
          or $state[$p:l1] = 73                             (: 'ascending' :)
          or $state[$p:l1] = 75                             (: 'case' :)
          or $state[$p:l1] = 81                             (: 'cast' :)
          or $state[$p:l1] = 82                             (: 'castable' :)
          or $state[$p:l1] = 83                             (: 'collation' :)
          or $state[$p:l1] = 86                             (: 'count' :)
          or $state[$p:l1] = 91                             (: 'declare' :)
          or $state[$p:l1] = 94                             (: 'default' :)
          or $state[$p:l1] = 95                             (: 'descending' :)
          or $state[$p:l1] = 98                             (: 'div' :)
          or $state[$p:l1] = 100                            (: 'document-node' :)
          or $state[$p:l1] = 102                            (: 'else' :)
          or $state[$p:l1] = 104                            (: 'empty' :)
          or $state[$p:l1] = 105                            (: 'end' :)
          or $state[$p:l1] = 108                            (: 'eq' :)
          or $state[$p:l1] = 109                            (: 'every' :)
          or $state[$p:l1] = 110                            (: 'except' :)
          or $state[$p:l1] = 111                            (: 'for' :)
          or $state[$p:l1] = 115                            (: 'function' :)
          or $state[$p:l1] = 116                            (: 'ge' :)
          or $state[$p:l1] = 117                            (: 'group' :)
          or $state[$p:l1] = 119                            (: 'gt' :)
          or $state[$p:l1] = 121                            (: 'idiv' :)
          or $state[$p:l1] = 122                            (: 'import' :)
          or $state[$p:l1] = 124                            (: 'instance' :)
          or $state[$p:l1] = 128                            (: 'intersect' :)
          or $state[$p:l1] = 129                            (: 'is' :)
          or $state[$p:l1] = 130                            (: 'le' :)
          or $state[$p:l1] = 133                            (: 'let' :)
          or $state[$p:l1] = 135                            (: 'lt' :)
          or $state[$p:l1] = 136                            (: 'mod' :)
          or $state[$p:l1] = 138                            (: 'module' :)
          or $state[$p:l1] = 139                            (: 'namespace-node' :)
          or $state[$p:l1] = 141                            (: 'ne' :)
          or $state[$p:l1] = 142                            (: 'node' :)
          or $state[$p:l1] = 146                            (: 'only' :)
          or $state[$p:l1] = 148                            (: 'or' :)
          or $state[$p:l1] = 150                            (: 'order' :)
          or $state[$p:l1] = 151                            (: 'return' :)
          or $state[$p:l1] = 163                            (: 'satisfies' :)
          or $state[$p:l1] = 164                            (: 'schema-attribute' :)
          or $state[$p:l1] = 166                            (: 'schema-element' :)
          or $state[$p:l1] = 167                            (: 'some' :)
          or $state[$p:l1] = 170                            (: 'stable' :)
          or $state[$p:l1] = 171                            (: 'start' :)
          or $state[$p:l1] = 172                            (: 'to' :)
          or $state[$p:l1] = 178                            (: 'treat' :)
          or $state[$p:l1] = 179                            (: 'try' :)
          or $state[$p:l1] = 180                            (: 'union' :)
          or $state[$p:l1] = 184                            (: 'validate' :)
          or $state[$p:l1] = 186                            (: 'where' :)
          or $state[$p:l1] = 190                            (: 'xquery' :)
          or $state[$p:l1] = 192) then                      (: 'xquery' :)
      let $state := p:lookahead2W(192, $input, $state)      (: EOF | S^WS | '!=' | '#' | '(' | ('(' ':') | ')' | '*' |
                                                               '+' | ',' | '-' | '/' | '//' | ';' | '<' | '<<' | '<=' |
                                                               '=' | '>' | '>=' | '>>' | '[' | ']' | 'and' |
                                                               'ascending' | 'case' | 'cast' | 'castable' |
                                                               'collation' | 'count' | 'default' | 'descending' |
                                                               'div' | 'else' | 'empty' | 'end' | 'eq' | 'except' |
                                                               'for' | 'ge' | 'group' | 'gt' | 'idiv' | 'instance' |
                                                               'intersect' | 'is' | 'le' | 'let' | 'lt' | 'mod' | 'ne' |
                                                               'only' | 'or' | 'order' | 'return' | 'satisfies' |
                                                               'stable' | 'start' | 'to' | 'treat' | 'union' | 'where' |
                                                               '|' | '}' :)
      return $state
    else
      ($state[$p:l1], subsequence($state, $p:lk + 1))
  let $state :=
    if ($state[$p:lk] = 9                                   (: IntegerLiteral :)
     or $state[$p:lk] = 10                                  (: DecimalLiteral :)
     or $state[$p:lk] = 11                                  (: DoubleLiteral :)
     or $state[$p:lk] = 12                                  (: StringLiteral :)
     or $state[$p:lk] = 30                                  (: '$' :)
     or $state[$p:lk] = 33                                  (: '(' :)
     or $state[$p:lk] = 43                                  (: '.' :)
     or $state[$p:lk] = 52                                  (: '<' :)
     or $state[$p:lk] = 53                                  (: '<!--' :)
     or $state[$p:lk] = 58                                  (: '<?' :)
     or $state[$p:lk] = 1869                                (: 'attribute' EQName^Token :)
     or $state[$p:lk] = 1895                                (: 'element' EQName^Token :)
     or $state[$p:lk] = 5516                                (: 'namespace' NCName^Token :)
     or $state[$p:lk] = 5538                                (: 'processing-instruction' NCName^Token :)
     or $state[$p:lk] = 7175                                (: EQName^Token '#' :)
     or $state[$p:lk] = 7239                                (: 'ancestor' '#' :)
     or $state[$p:lk] = 7240                                (: 'ancestor-or-self' '#' :)
     or $state[$p:lk] = 7241                                (: 'and' '#' :)
     or $state[$p:lk] = 7243                                (: 'ascending' '#' :)
     or $state[$p:lk] = 7245                                (: 'attribute' '#' :)
     or $state[$p:lk] = 7249                                (: 'case' '#' :)
     or $state[$p:lk] = 7250                                (: 'cast' '#' :)
     or $state[$p:lk] = 7251                                (: 'castable' '#' :)
     or $state[$p:lk] = 7253                                (: 'child' '#' :)
     or $state[$p:lk] = 7254                                (: 'collation' '#' :)
     or $state[$p:lk] = 7255                                (: 'comment' '#' :)
     or $state[$p:lk] = 7259                                (: 'count' '#' :)
     or $state[$p:lk] = 7262                                (: 'declare' '#' :)
     or $state[$p:lk] = 7263                                (: 'default' '#' :)
     or $state[$p:lk] = 7264                                (: 'descendant' '#' :)
     or $state[$p:lk] = 7265                                (: 'descendant-or-self' '#' :)
     or $state[$p:lk] = 7266                                (: 'descending' '#' :)
     or $state[$p:lk] = 7268                                (: 'div' '#' :)
     or $state[$p:lk] = 7269                                (: 'document' '#' :)
     or $state[$p:lk] = 7270                                (: 'document-node' '#' :)
     or $state[$p:lk] = 7271                                (: 'element' '#' :)
     or $state[$p:lk] = 7272                                (: 'else' '#' :)
     or $state[$p:lk] = 7273                                (: 'empty' '#' :)
     or $state[$p:lk] = 7274                                (: 'empty-sequence' '#' :)
     or $state[$p:lk] = 7276                                (: 'end' '#' :)
     or $state[$p:lk] = 7277                                (: 'eq' '#' :)
     or $state[$p:lk] = 7278                                (: 'every' '#' :)
     or $state[$p:lk] = 7279                                (: 'except' '#' :)
     or $state[$p:lk] = 7281                                (: 'following' '#' :)
     or $state[$p:lk] = 7282                                (: 'following-sibling' '#' :)
     or $state[$p:lk] = 7283                                (: 'for' '#' :)
     or $state[$p:lk] = 7284                                (: 'function' '#' :)
     or $state[$p:lk] = 7285                                (: 'ge' '#' :)
     or $state[$p:lk] = 7287                                (: 'group' '#' :)
     or $state[$p:lk] = 7289                                (: 'gt' '#' :)
     or $state[$p:lk] = 7290                                (: 'idiv' '#' :)
     or $state[$p:lk] = 7291                                (: 'if' '#' :)
     or $state[$p:lk] = 7292                                (: 'import' '#' :)
     or $state[$p:lk] = 7296                                (: 'instance' '#' :)
     or $state[$p:lk] = 7297                                (: 'intersect' '#' :)
     or $state[$p:lk] = 7298                                (: 'is' '#' :)
     or $state[$p:lk] = 7299                                (: 'item' '#' :)
     or $state[$p:lk] = 7301                                (: 'le' '#' :)
     or $state[$p:lk] = 7303                                (: 'let' '#' :)
     or $state[$p:lk] = 7304                                (: 'lt' '#' :)
     or $state[$p:lk] = 7306                                (: 'mod' '#' :)
     or $state[$p:lk] = 7307                                (: 'module' '#' :)
     or $state[$p:lk] = 7308                                (: 'namespace' '#' :)
     or $state[$p:lk] = 7309                                (: 'namespace-node' '#' :)
     or $state[$p:lk] = 7310                                (: 'ne' '#' :)
     or $state[$p:lk] = 7314                                (: 'node' '#' :)
     or $state[$p:lk] = 7316                                (: 'only' '#' :)
     or $state[$p:lk] = 7318                                (: 'or' '#' :)
     or $state[$p:lk] = 7319                                (: 'order' '#' :)
     or $state[$p:lk] = 7320                                (: 'ordered' '#' :)
     or $state[$p:lk] = 7322                                (: 'parent' '#' :)
     or $state[$p:lk] = 7326                                (: 'preceding' '#' :)
     or $state[$p:lk] = 7327                                (: 'preceding-sibling' '#' :)
     or $state[$p:lk] = 7330                                (: 'processing-instruction' '#' :)
     or $state[$p:lk] = 7331                                (: 'return' '#' :)
     or $state[$p:lk] = 7332                                (: 'satisfies' '#' :)
     or $state[$p:lk] = 7334                                (: 'schema-attribute' '#' :)
     or $state[$p:lk] = 7335                                (: 'schema-element' '#' :)
     or $state[$p:lk] = 7336                                (: 'self' '#' :)
     or $state[$p:lk] = 7338                                (: 'some' '#' :)
     or $state[$p:lk] = 7339                                (: 'stable' '#' :)
     or $state[$p:lk] = 7340                                (: 'start' '#' :)
     or $state[$p:lk] = 7343                                (: 'switch' '#' :)
     or $state[$p:lk] = 7344                                (: 'text' '#' :)
     or $state[$p:lk] = 7346                                (: 'to' '#' :)
     or $state[$p:lk] = 7347                                (: 'treat' '#' :)
     or $state[$p:lk] = 7348                                (: 'try' '#' :)
     or $state[$p:lk] = 7351                                (: 'typeswitch' '#' :)
     or $state[$p:lk] = 7352                                (: 'union' '#' :)
     or $state[$p:lk] = 7353                                (: 'unordered' '#' :)
     or $state[$p:lk] = 7354                                (: 'validate' '#' :)
     or $state[$p:lk] = 7358                                (: 'where' '#' :)
     or $state[$p:lk] = 7360                                (: 'xquery' '#' :)
     or $state[$p:lk] = 8455                                (: EQName^Token '(' :)
     or $state[$p:lk] = 8519                                (: 'ancestor' '(' :)
     or $state[$p:lk] = 8520                                (: 'ancestor-or-self' '(' :)
     or $state[$p:lk] = 8521                                (: 'and' '(' :)
     or $state[$p:lk] = 8523                                (: 'ascending' '(' :)
     or $state[$p:lk] = 8529                                (: 'case' '(' :)
     or $state[$p:lk] = 8530                                (: 'cast' '(' :)
     or $state[$p:lk] = 8531                                (: 'castable' '(' :)
     or $state[$p:lk] = 8533                                (: 'child' '(' :)
     or $state[$p:lk] = 8534                                (: 'collation' '(' :)
     or $state[$p:lk] = 8539                                (: 'count' '(' :)
     or $state[$p:lk] = 8542                                (: 'declare' '(' :)
     or $state[$p:lk] = 8543                                (: 'default' '(' :)
     or $state[$p:lk] = 8544                                (: 'descendant' '(' :)
     or $state[$p:lk] = 8545                                (: 'descendant-or-self' '(' :)
     or $state[$p:lk] = 8546                                (: 'descending' '(' :)
     or $state[$p:lk] = 8548                                (: 'div' '(' :)
     or $state[$p:lk] = 8549                                (: 'document' '(' :)
     or $state[$p:lk] = 8552                                (: 'else' '(' :)
     or $state[$p:lk] = 8553                                (: 'empty' '(' :)
     or $state[$p:lk] = 8556                                (: 'end' '(' :)
     or $state[$p:lk] = 8557                                (: 'eq' '(' :)
     or $state[$p:lk] = 8558                                (: 'every' '(' :)
     or $state[$p:lk] = 8559                                (: 'except' '(' :)
     or $state[$p:lk] = 8561                                (: 'following' '(' :)
     or $state[$p:lk] = 8562                                (: 'following-sibling' '(' :)
     or $state[$p:lk] = 8563                                (: 'for' '(' :)
     or $state[$p:lk] = 8564                                (: 'function' '(' :)
     or $state[$p:lk] = 8565                                (: 'ge' '(' :)
     or $state[$p:lk] = 8567                                (: 'group' '(' :)
     or $state[$p:lk] = 8569                                (: 'gt' '(' :)
     or $state[$p:lk] = 8570                                (: 'idiv' '(' :)
     or $state[$p:lk] = 8572                                (: 'import' '(' :)
     or $state[$p:lk] = 8576                                (: 'instance' '(' :)
     or $state[$p:lk] = 8577                                (: 'intersect' '(' :)
     or $state[$p:lk] = 8578                                (: 'is' '(' :)
     or $state[$p:lk] = 8581                                (: 'le' '(' :)
     or $state[$p:lk] = 8583                                (: 'let' '(' :)
     or $state[$p:lk] = 8584                                (: 'lt' '(' :)
     or $state[$p:lk] = 8586                                (: 'mod' '(' :)
     or $state[$p:lk] = 8587                                (: 'module' '(' :)
     or $state[$p:lk] = 8588                                (: 'namespace' '(' :)
     or $state[$p:lk] = 8590                                (: 'ne' '(' :)
     or $state[$p:lk] = 8596                                (: 'only' '(' :)
     or $state[$p:lk] = 8598                                (: 'or' '(' :)
     or $state[$p:lk] = 8599                                (: 'order' '(' :)
     or $state[$p:lk] = 8600                                (: 'ordered' '(' :)
     or $state[$p:lk] = 8602                                (: 'parent' '(' :)
     or $state[$p:lk] = 8606                                (: 'preceding' '(' :)
     or $state[$p:lk] = 8607                                (: 'preceding-sibling' '(' :)
     or $state[$p:lk] = 8611                                (: 'return' '(' :)
     or $state[$p:lk] = 8612                                (: 'satisfies' '(' :)
     or $state[$p:lk] = 8616                                (: 'self' '(' :)
     or $state[$p:lk] = 8618                                (: 'some' '(' :)
     or $state[$p:lk] = 8619                                (: 'stable' '(' :)
     or $state[$p:lk] = 8620                                (: 'start' '(' :)
     or $state[$p:lk] = 8626                                (: 'to' '(' :)
     or $state[$p:lk] = 8627                                (: 'treat' '(' :)
     or $state[$p:lk] = 8628                                (: 'try' '(' :)
     or $state[$p:lk] = 8632                                (: 'union' '(' :)
     or $state[$p:lk] = 8633                                (: 'unordered' '(' :)
     or $state[$p:lk] = 8634                                (: 'validate' '(' :)
     or $state[$p:lk] = 8638                                (: 'where' '(' :)
     or $state[$p:lk] = 8640                                (: 'xquery' '(' :)
     or $state[$p:lk] = 18253                               (: 'attribute' 'ancestor' :)
     or $state[$p:lk] = 18279                               (: 'element' 'ancestor' :)
     or $state[$p:lk] = 18509                               (: 'attribute' 'ancestor-or-self' :)
     or $state[$p:lk] = 18535                               (: 'element' 'ancestor-or-self' :)
     or $state[$p:lk] = 19789                               (: 'attribute' 'attribute' :)
     or $state[$p:lk] = 19815                               (: 'element' 'attribute' :)
     or $state[$p:lk] = 21837                               (: 'attribute' 'child' :)
     or $state[$p:lk] = 21863                               (: 'element' 'child' :)
     or $state[$p:lk] = 22349                               (: 'attribute' 'comment' :)
     or $state[$p:lk] = 22375                               (: 'element' 'comment' :)
     or $state[$p:lk] = 24141                               (: 'attribute' 'declare' :)
     or $state[$p:lk] = 24167                               (: 'element' 'declare' :)
     or $state[$p:lk] = 24653                               (: 'attribute' 'descendant' :)
     or $state[$p:lk] = 24679                               (: 'element' 'descendant' :)
     or $state[$p:lk] = 24909                               (: 'attribute' 'descendant-or-self' :)
     or $state[$p:lk] = 24935                               (: 'element' 'descendant-or-self' :)
     or $state[$p:lk] = 25933                               (: 'attribute' 'document' :)
     or $state[$p:lk] = 25959                               (: 'element' 'document' :)
     or $state[$p:lk] = 26189                               (: 'attribute' 'document-node' :)
     or $state[$p:lk] = 26215                               (: 'element' 'document-node' :)
     or $state[$p:lk] = 26445                               (: 'attribute' 'element' :)
     or $state[$p:lk] = 26471                               (: 'element' 'element' :)
     or $state[$p:lk] = 27213                               (: 'attribute' 'empty-sequence' :)
     or $state[$p:lk] = 27239                               (: 'element' 'empty-sequence' :)
     or $state[$p:lk] = 28237                               (: 'attribute' 'every' :)
     or $state[$p:lk] = 28263                               (: 'element' 'every' :)
     or $state[$p:lk] = 29005                               (: 'attribute' 'following' :)
     or $state[$p:lk] = 29031                               (: 'element' 'following' :)
     or $state[$p:lk] = 29261                               (: 'attribute' 'following-sibling' :)
     or $state[$p:lk] = 29287                               (: 'element' 'following-sibling' :)
     or $state[$p:lk] = 29773                               (: 'attribute' 'function' :)
     or $state[$p:lk] = 29799                               (: 'element' 'function' :)
     or $state[$p:lk] = 31565                               (: 'attribute' 'if' :)
     or $state[$p:lk] = 31591                               (: 'element' 'if' :)
     or $state[$p:lk] = 31821                               (: 'attribute' 'import' :)
     or $state[$p:lk] = 31847                               (: 'element' 'import' :)
     or $state[$p:lk] = 33613                               (: 'attribute' 'item' :)
     or $state[$p:lk] = 33639                               (: 'element' 'item' :)
     or $state[$p:lk] = 35661                               (: 'attribute' 'module' :)
     or $state[$p:lk] = 35687                               (: 'element' 'module' :)
     or $state[$p:lk] = 35917                               (: 'attribute' 'namespace' :)
     or $state[$p:lk] = 35943                               (: 'element' 'namespace' :)
     or $state[$p:lk] = 36173                               (: 'attribute' 'namespace-node' :)
     or $state[$p:lk] = 36199                               (: 'element' 'namespace-node' :)
     or $state[$p:lk] = 37453                               (: 'attribute' 'node' :)
     or $state[$p:lk] = 37479                               (: 'element' 'node' :)
     or $state[$p:lk] = 38989                               (: 'attribute' 'ordered' :)
     or $state[$p:lk] = 39015                               (: 'element' 'ordered' :)
     or $state[$p:lk] = 39501                               (: 'attribute' 'parent' :)
     or $state[$p:lk] = 39527                               (: 'element' 'parent' :)
     or $state[$p:lk] = 40525                               (: 'attribute' 'preceding' :)
     or $state[$p:lk] = 40551                               (: 'element' 'preceding' :)
     or $state[$p:lk] = 40781                               (: 'attribute' 'preceding-sibling' :)
     or $state[$p:lk] = 40807                               (: 'element' 'preceding-sibling' :)
     or $state[$p:lk] = 41549                               (: 'attribute' 'processing-instruction' :)
     or $state[$p:lk] = 41575                               (: 'element' 'processing-instruction' :)
     or $state[$p:lk] = 42573                               (: 'attribute' 'schema-attribute' :)
     or $state[$p:lk] = 42599                               (: 'element' 'schema-attribute' :)
     or $state[$p:lk] = 42829                               (: 'attribute' 'schema-element' :)
     or $state[$p:lk] = 42855                               (: 'element' 'schema-element' :)
     or $state[$p:lk] = 43085                               (: 'attribute' 'self' :)
     or $state[$p:lk] = 43111                               (: 'element' 'self' :)
     or $state[$p:lk] = 43597                               (: 'attribute' 'some' :)
     or $state[$p:lk] = 43623                               (: 'element' 'some' :)
     or $state[$p:lk] = 44877                               (: 'attribute' 'switch' :)
     or $state[$p:lk] = 44903                               (: 'element' 'switch' :)
     or $state[$p:lk] = 45133                               (: 'attribute' 'text' :)
     or $state[$p:lk] = 45159                               (: 'element' 'text' :)
     or $state[$p:lk] = 46157                               (: 'attribute' 'try' :)
     or $state[$p:lk] = 46183                               (: 'element' 'try' :)
     or $state[$p:lk] = 46925                               (: 'attribute' 'typeswitch' :)
     or $state[$p:lk] = 46951                               (: 'element' 'typeswitch' :)
     or $state[$p:lk] = 47437                               (: 'attribute' 'unordered' :)
     or $state[$p:lk] = 47463                               (: 'element' 'unordered' :)
     or $state[$p:lk] = 47693                               (: 'attribute' 'validate' :)
     or $state[$p:lk] = 47719                               (: 'element' 'validate' :)
     or $state[$p:lk] = 49229                               (: 'attribute' 'xquery' :)
     or $state[$p:lk] = 49255                               (: 'element' 'xquery' :)
     or $state[$p:lk] = 49741                               (: 'attribute' '{' :)
     or $state[$p:lk] = 49751                               (: 'comment' '{' :)
     or $state[$p:lk] = 49765                               (: 'document' '{' :)
     or $state[$p:lk] = 49767                               (: 'element' '{' :)
     or $state[$p:lk] = 49804                               (: 'namespace' '{' :)
     or $state[$p:lk] = 49816                               (: 'ordered' '{' :)
     or $state[$p:lk] = 49826                               (: 'processing-instruction' '{' :)
     or $state[$p:lk] = 49840                               (: 'text' '{' :)
     or $state[$p:lk] = 49849                               (: 'unordered' '{' :)
     or $state[$p:lk] = 12732749                            (: 'attribute' 'and' '{' :)
     or $state[$p:lk] = 12732775                            (: 'element' 'and' '{' :)
     or $state[$p:lk] = 12732812                            (: 'namespace' 'and' '{' :)
     or $state[$p:lk] = 12732834                            (: 'processing-instruction' 'and' '{' :)
     or $state[$p:lk] = 12733261                            (: 'attribute' 'ascending' '{' :)
     or $state[$p:lk] = 12733287                            (: 'element' 'ascending' '{' :)
     or $state[$p:lk] = 12733324                            (: 'namespace' 'ascending' '{' :)
     or $state[$p:lk] = 12733346                            (: 'processing-instruction' 'ascending' '{' :)
     or $state[$p:lk] = 12734797                            (: 'attribute' 'case' '{' :)
     or $state[$p:lk] = 12734823                            (: 'element' 'case' '{' :)
     or $state[$p:lk] = 12734860                            (: 'namespace' 'case' '{' :)
     or $state[$p:lk] = 12734882                            (: 'processing-instruction' 'case' '{' :)
     or $state[$p:lk] = 12735053                            (: 'attribute' 'cast' '{' :)
     or $state[$p:lk] = 12735079                            (: 'element' 'cast' '{' :)
     or $state[$p:lk] = 12735116                            (: 'namespace' 'cast' '{' :)
     or $state[$p:lk] = 12735138                            (: 'processing-instruction' 'cast' '{' :)
     or $state[$p:lk] = 12735309                            (: 'attribute' 'castable' '{' :)
     or $state[$p:lk] = 12735335                            (: 'element' 'castable' '{' :)
     or $state[$p:lk] = 12735372                            (: 'namespace' 'castable' '{' :)
     or $state[$p:lk] = 12735394                            (: 'processing-instruction' 'castable' '{' :)
     or $state[$p:lk] = 12736077                            (: 'attribute' 'collation' '{' :)
     or $state[$p:lk] = 12736103                            (: 'element' 'collation' '{' :)
     or $state[$p:lk] = 12736140                            (: 'namespace' 'collation' '{' :)
     or $state[$p:lk] = 12736162                            (: 'processing-instruction' 'collation' '{' :)
     or $state[$p:lk] = 12737357                            (: 'attribute' 'count' '{' :)
     or $state[$p:lk] = 12737383                            (: 'element' 'count' '{' :)
     or $state[$p:lk] = 12737420                            (: 'namespace' 'count' '{' :)
     or $state[$p:lk] = 12737442                            (: 'processing-instruction' 'count' '{' :)
     or $state[$p:lk] = 12738381                            (: 'attribute' 'default' '{' :)
     or $state[$p:lk] = 12738407                            (: 'element' 'default' '{' :)
     or $state[$p:lk] = 12738444                            (: 'namespace' 'default' '{' :)
     or $state[$p:lk] = 12738466                            (: 'processing-instruction' 'default' '{' :)
     or $state[$p:lk] = 12739149                            (: 'attribute' 'descending' '{' :)
     or $state[$p:lk] = 12739175                            (: 'element' 'descending' '{' :)
     or $state[$p:lk] = 12739212                            (: 'namespace' 'descending' '{' :)
     or $state[$p:lk] = 12739234                            (: 'processing-instruction' 'descending' '{' :)
     or $state[$p:lk] = 12739661                            (: 'attribute' 'div' '{' :)
     or $state[$p:lk] = 12739687                            (: 'element' 'div' '{' :)
     or $state[$p:lk] = 12739724                            (: 'namespace' 'div' '{' :)
     or $state[$p:lk] = 12739746                            (: 'processing-instruction' 'div' '{' :)
     or $state[$p:lk] = 12740685                            (: 'attribute' 'else' '{' :)
     or $state[$p:lk] = 12740711                            (: 'element' 'else' '{' :)
     or $state[$p:lk] = 12740748                            (: 'namespace' 'else' '{' :)
     or $state[$p:lk] = 12740770                            (: 'processing-instruction' 'else' '{' :)
     or $state[$p:lk] = 12740941                            (: 'attribute' 'empty' '{' :)
     or $state[$p:lk] = 12740967                            (: 'element' 'empty' '{' :)
     or $state[$p:lk] = 12741004                            (: 'namespace' 'empty' '{' :)
     or $state[$p:lk] = 12741026                            (: 'processing-instruction' 'empty' '{' :)
     or $state[$p:lk] = 12741709                            (: 'attribute' 'end' '{' :)
     or $state[$p:lk] = 12741735                            (: 'element' 'end' '{' :)
     or $state[$p:lk] = 12741772                            (: 'namespace' 'end' '{' :)
     or $state[$p:lk] = 12741794                            (: 'processing-instruction' 'end' '{' :)
     or $state[$p:lk] = 12741965                            (: 'attribute' 'eq' '{' :)
     or $state[$p:lk] = 12741991                            (: 'element' 'eq' '{' :)
     or $state[$p:lk] = 12742028                            (: 'namespace' 'eq' '{' :)
     or $state[$p:lk] = 12742050                            (: 'processing-instruction' 'eq' '{' :)
     or $state[$p:lk] = 12742477                            (: 'attribute' 'except' '{' :)
     or $state[$p:lk] = 12742503                            (: 'element' 'except' '{' :)
     or $state[$p:lk] = 12742540                            (: 'namespace' 'except' '{' :)
     or $state[$p:lk] = 12742562                            (: 'processing-instruction' 'except' '{' :)
     or $state[$p:lk] = 12743501                            (: 'attribute' 'for' '{' :)
     or $state[$p:lk] = 12743527                            (: 'element' 'for' '{' :)
     or $state[$p:lk] = 12743564                            (: 'namespace' 'for' '{' :)
     or $state[$p:lk] = 12743586                            (: 'processing-instruction' 'for' '{' :)
     or $state[$p:lk] = 12744013                            (: 'attribute' 'ge' '{' :)
     or $state[$p:lk] = 12744039                            (: 'element' 'ge' '{' :)
     or $state[$p:lk] = 12744076                            (: 'namespace' 'ge' '{' :)
     or $state[$p:lk] = 12744098                            (: 'processing-instruction' 'ge' '{' :)
     or $state[$p:lk] = 12744525                            (: 'attribute' 'group' '{' :)
     or $state[$p:lk] = 12744551                            (: 'element' 'group' '{' :)
     or $state[$p:lk] = 12744588                            (: 'namespace' 'group' '{' :)
     or $state[$p:lk] = 12744610                            (: 'processing-instruction' 'group' '{' :)
     or $state[$p:lk] = 12745037                            (: 'attribute' 'gt' '{' :)
     or $state[$p:lk] = 12745063                            (: 'element' 'gt' '{' :)
     or $state[$p:lk] = 12745100                            (: 'namespace' 'gt' '{' :)
     or $state[$p:lk] = 12745122                            (: 'processing-instruction' 'gt' '{' :)
     or $state[$p:lk] = 12745293                            (: 'attribute' 'idiv' '{' :)
     or $state[$p:lk] = 12745319                            (: 'element' 'idiv' '{' :)
     or $state[$p:lk] = 12745356                            (: 'namespace' 'idiv' '{' :)
     or $state[$p:lk] = 12745378                            (: 'processing-instruction' 'idiv' '{' :)
     or $state[$p:lk] = 12746829                            (: 'attribute' 'instance' '{' :)
     or $state[$p:lk] = 12746855                            (: 'element' 'instance' '{' :)
     or $state[$p:lk] = 12746892                            (: 'namespace' 'instance' '{' :)
     or $state[$p:lk] = 12746914                            (: 'processing-instruction' 'instance' '{' :)
     or $state[$p:lk] = 12747085                            (: 'attribute' 'intersect' '{' :)
     or $state[$p:lk] = 12747111                            (: 'element' 'intersect' '{' :)
     or $state[$p:lk] = 12747148                            (: 'namespace' 'intersect' '{' :)
     or $state[$p:lk] = 12747170                            (: 'processing-instruction' 'intersect' '{' :)
     or $state[$p:lk] = 12747341                            (: 'attribute' 'is' '{' :)
     or $state[$p:lk] = 12747367                            (: 'element' 'is' '{' :)
     or $state[$p:lk] = 12747404                            (: 'namespace' 'is' '{' :)
     or $state[$p:lk] = 12747426                            (: 'processing-instruction' 'is' '{' :)
     or $state[$p:lk] = 12748109                            (: 'attribute' 'le' '{' :)
     or $state[$p:lk] = 12748135                            (: 'element' 'le' '{' :)
     or $state[$p:lk] = 12748172                            (: 'namespace' 'le' '{' :)
     or $state[$p:lk] = 12748194                            (: 'processing-instruction' 'le' '{' :)
     or $state[$p:lk] = 12748621                            (: 'attribute' 'let' '{' :)
     or $state[$p:lk] = 12748647                            (: 'element' 'let' '{' :)
     or $state[$p:lk] = 12748684                            (: 'namespace' 'let' '{' :)
     or $state[$p:lk] = 12748706                            (: 'processing-instruction' 'let' '{' :)
     or $state[$p:lk] = 12748877                            (: 'attribute' 'lt' '{' :)
     or $state[$p:lk] = 12748903                            (: 'element' 'lt' '{' :)
     or $state[$p:lk] = 12748940                            (: 'namespace' 'lt' '{' :)
     or $state[$p:lk] = 12748962                            (: 'processing-instruction' 'lt' '{' :)
     or $state[$p:lk] = 12749389                            (: 'attribute' 'mod' '{' :)
     or $state[$p:lk] = 12749415                            (: 'element' 'mod' '{' :)
     or $state[$p:lk] = 12749452                            (: 'namespace' 'mod' '{' :)
     or $state[$p:lk] = 12749474                            (: 'processing-instruction' 'mod' '{' :)
     or $state[$p:lk] = 12750413                            (: 'attribute' 'ne' '{' :)
     or $state[$p:lk] = 12750439                            (: 'element' 'ne' '{' :)
     or $state[$p:lk] = 12750476                            (: 'namespace' 'ne' '{' :)
     or $state[$p:lk] = 12750498                            (: 'processing-instruction' 'ne' '{' :)
     or $state[$p:lk] = 12751949                            (: 'attribute' 'only' '{' :)
     or $state[$p:lk] = 12751975                            (: 'element' 'only' '{' :)
     or $state[$p:lk] = 12752012                            (: 'namespace' 'only' '{' :)
     or $state[$p:lk] = 12752034                            (: 'processing-instruction' 'only' '{' :)
     or $state[$p:lk] = 12752461                            (: 'attribute' 'or' '{' :)
     or $state[$p:lk] = 12752487                            (: 'element' 'or' '{' :)
     or $state[$p:lk] = 12752524                            (: 'namespace' 'or' '{' :)
     or $state[$p:lk] = 12752546                            (: 'processing-instruction' 'or' '{' :)
     or $state[$p:lk] = 12752717                            (: 'attribute' 'order' '{' :)
     or $state[$p:lk] = 12752743                            (: 'element' 'order' '{' :)
     or $state[$p:lk] = 12752780                            (: 'namespace' 'order' '{' :)
     or $state[$p:lk] = 12752802                            (: 'processing-instruction' 'order' '{' :)
     or $state[$p:lk] = 12755789                            (: 'attribute' 'return' '{' :)
     or $state[$p:lk] = 12755815                            (: 'element' 'return' '{' :)
     or $state[$p:lk] = 12755852                            (: 'namespace' 'return' '{' :)
     or $state[$p:lk] = 12755874                            (: 'processing-instruction' 'return' '{' :)
     or $state[$p:lk] = 12756045                            (: 'attribute' 'satisfies' '{' :)
     or $state[$p:lk] = 12756071                            (: 'element' 'satisfies' '{' :)
     or $state[$p:lk] = 12756108                            (: 'namespace' 'satisfies' '{' :)
     or $state[$p:lk] = 12756130                            (: 'processing-instruction' 'satisfies' '{' :)
     or $state[$p:lk] = 12757837                            (: 'attribute' 'stable' '{' :)
     or $state[$p:lk] = 12757863                            (: 'element' 'stable' '{' :)
     or $state[$p:lk] = 12757900                            (: 'namespace' 'stable' '{' :)
     or $state[$p:lk] = 12757922                            (: 'processing-instruction' 'stable' '{' :)
     or $state[$p:lk] = 12758093                            (: 'attribute' 'start' '{' :)
     or $state[$p:lk] = 12758119                            (: 'element' 'start' '{' :)
     or $state[$p:lk] = 12758156                            (: 'namespace' 'start' '{' :)
     or $state[$p:lk] = 12758178                            (: 'processing-instruction' 'start' '{' :)
     or $state[$p:lk] = 12759629                            (: 'attribute' 'to' '{' :)
     or $state[$p:lk] = 12759655                            (: 'element' 'to' '{' :)
     or $state[$p:lk] = 12759692                            (: 'namespace' 'to' '{' :)
     or $state[$p:lk] = 12759714                            (: 'processing-instruction' 'to' '{' :)
     or $state[$p:lk] = 12759885                            (: 'attribute' 'treat' '{' :)
     or $state[$p:lk] = 12759911                            (: 'element' 'treat' '{' :)
     or $state[$p:lk] = 12759948                            (: 'namespace' 'treat' '{' :)
     or $state[$p:lk] = 12759970                            (: 'processing-instruction' 'treat' '{' :)
     or $state[$p:lk] = 12761165                            (: 'attribute' 'union' '{' :)
     or $state[$p:lk] = 12761191                            (: 'element' 'union' '{' :)
     or $state[$p:lk] = 12761228                            (: 'namespace' 'union' '{' :)
     or $state[$p:lk] = 12761250                            (: 'processing-instruction' 'union' '{' :)
     or $state[$p:lk] = 12762701                            (: 'attribute' 'where' '{' :)
     or $state[$p:lk] = 12762727                            (: 'element' 'where' '{' :)
     or $state[$p:lk] = 12762764                            (: 'namespace' 'where' '{' :)
     or $state[$p:lk] = 12762786) then                      (: 'processing-instruction' 'where' '{' :)
      let $state := p:parse-PostfixExpr($input, $state)
      return $state
    else if ($state[$p:error]) then
      $state
    else
      let $state := p:parse-AxisStep($input, $state)
      return $state
  return p:reduce($state, "StepExpr", $count)
};

(:~
 : Parse the 1st loop of production RelativePathExpr (zero or more). Use
 : tail recursion for iteratively updating the parser state.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-RelativePathExpr-1($input as xs:string, $state as item()+) as item()+
{
  if ($state[$p:error]) then
    $state
  else
    let $state := p:lookahead1W(186, $input, $state)        (: EOF | S^WS | '!=' | ('(' ':') | ')' | '*' | '+' | ',' |
                                                               '-' | '/' | '//' | ';' | '<' | '<<' | '<=' | '=' | '>' |
                                                               '>=' | '>>' | ']' | 'and' | 'ascending' | 'case' |
                                                               'cast' | 'castable' | 'collation' | 'count' | 'default' |
                                                               'descending' | 'div' | 'else' | 'empty' | 'end' | 'eq' |
                                                               'except' | 'for' | 'ge' | 'group' | 'gt' | 'idiv' |
                                                               'instance' | 'intersect' | 'is' | 'le' | 'let' | 'lt' |
                                                               'mod' | 'ne' | 'only' | 'or' | 'order' | 'return' |
                                                               'satisfies' | 'stable' | 'start' | 'to' | 'treat' |
                                                               'union' | 'where' | '|' | '}' :)
    return
      if ($state[$p:l1] != 45                               (: '/' :)
      and $state[$p:l1] != 46) then                         (: '//' :)
        $state
      else
        let $state :=
          if ($state[$p:l1] = 45) then                      (: '/' :)
            let $state := p:shift(45, $input, $state)       (: '/' :)
            return $state
          else if ($state[$p:error]) then
            $state
          else
            let $state := p:shift(46, $input, $state)       (: '//' :)
            return $state
        let $state := p:lookahead1W(31, $input, $state)     (: EPSILON | S^WS | ('(' ':') :)
        let $state := p:parse-StepExpr($input, $state)
        return p:parse-RelativePathExpr-1($input, $state)
};

(:~
 : Parse RelativePathExpr.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-RelativePathExpr($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:parse-StepExpr($input, $state)
  let $state := p:parse-RelativePathExpr-1($input, $state)
  return p:reduce($state, "RelativePathExpr", $count)
};

(:~
 : Parse PathExpr.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-PathExpr($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state :=
    if ($state[$p:l1] = 45) then                            (: '/' :)
      let $state := p:shift(45, $input, $state)             (: '/' :)
      let $state := p:lookahead1W(226, $input, $state)      (: EOF | Wildcard | EQName^Token | IntegerLiteral |
                                                               DecimalLiteral | DoubleLiteral | StringLiteral | S^WS |
                                                               '!=' | '$' | '(' | ('(' ':') | ')' | '*' | '+' | ',' |
                                                               '-' | '.' | '..' | ';' | '<' | '<!--' | '<<' | '<=' |
                                                               '<?' | '=' | '>' | '>=' | '>>' | '@' | ']' | 'ancestor' |
                                                               'ancestor-or-self' | 'and' | 'ascending' | 'attribute' |
                                                               'case' | 'cast' | 'castable' | 'child' | 'collation' |
                                                               'comment' | 'count' | 'declare' | 'default' |
                                                               'descendant' | 'descendant-or-self' | 'descending' |
                                                               'div' | 'document' | 'document-node' | 'element' |
                                                               'else' | 'empty' | 'empty-sequence' | 'end' | 'eq' |
                                                               'every' | 'except' | 'following' | 'following-sibling' |
                                                               'for' | 'function' | 'ge' | 'group' | 'gt' | 'idiv' |
                                                               'if' | 'import' | 'instance' | 'intersect' | 'is' |
                                                               'item' | 'le' | 'let' | 'lt' | 'mod' | 'module' |
                                                               'namespace' | 'namespace-node' | 'ne' | 'node' | 'only' |
                                                               'or' | 'order' | 'ordered' | 'parent' | 'preceding' |
                                                               'preceding-sibling' | 'processing-instruction' |
                                                               'return' | 'satisfies' | 'schema-attribute' |
                                                               'schema-element' | 'self' | 'some' | 'stable' | 'start' |
                                                               'switch' | 'text' | 'to' | 'treat' | 'try' |
                                                               'typeswitch' | 'union' | 'unordered' | 'validate' |
                                                               'where' | 'xquery' | '|' | '}' :)
      let $state :=
        if ($state[$p:l1] = 1                               (: EOF :)
         or $state[$p:l1] = 26                              (: '!=' :)
         or $state[$p:l1] = 36                              (: ')' :)
         or $state[$p:l1] = 37                              (: '*' :)
         or $state[$p:l1] = 39                              (: '+' :)
         or $state[$p:l1] = 40                              (: ',' :)
         or $state[$p:l1] = 41                              (: '-' :)
         or $state[$p:l1] = 51                              (: ';' :)
         or $state[$p:l1] = 56                              (: '<<' :)
         or $state[$p:l1] = 57                              (: '<=' :)
         or $state[$p:l1] = 59                              (: '=' :)
         or $state[$p:l1] = 60                              (: '>' :)
         or $state[$p:l1] = 61                              (: '>=' :)
         or $state[$p:l1] = 62                              (: '>>' :)
         or $state[$p:l1] = 68                              (: ']' :)
         or $state[$p:l1] = 196                             (: '|' :)
         or $state[$p:l1] = 197) then                       (: '}' :)
          $state
        else if ($state[$p:error]) then
          $state
        else
          let $state := p:parse-RelativePathExpr($input, $state)
          return $state
      return $state
    else if ($state[$p:l1] = 46) then                       (: '//' :)
      let $state := p:shift(46, $input, $state)             (: '//' :)
      let $state := p:lookahead1W(31, $input, $state)       (: EPSILON | S^WS | ('(' ':') :)
      let $state := p:parse-RelativePathExpr($input, $state)
      return $state
    else if ($state[$p:error]) then
      $state
    else
      let $state := p:parse-RelativePathExpr($input, $state)
      return $state
  return p:reduce($state, "PathExpr", $count)
};

(:~
 : Parse ValidationMode.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-ValidationMode($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state :=
    if ($state[$p:l1] = 132) then                           (: 'lax' :)
      let $state := p:shift(132, $input, $state)            (: 'lax' :)
      return $state
    else if ($state[$p:error]) then
      $state
    else
      let $state := p:shift(173, $input, $state)            (: 'strict' :)
      return $state
  return p:reduce($state, "ValidationMode", $count)
};

(:~
 : Parse ValidateExpr.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-ValidateExpr($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:shift(186, $input, $state)                (: 'validate' :)
  let $state := p:lookahead1W(142, $input, $state)          (: S^WS | ('(' ':') | 'lax' | 'strict' | 'type' | '{' :)
  let $state :=
    if ($state[$p:error]) then
      $state
    else if ($state[$p:l1] != 194) then                     (: '{' :)
      let $state :=
        if ($state[$p:l1] = 182) then                       (: 'type' :)
          let $state := p:shift(182, $input, $state)        (: 'type' :)
          let $state := p:lookahead1W(205, $input, $state)  (: EQName^Token | S^WS | ('(' ':') | 'ancestor' |
                                                               'ancestor-or-self' | 'and' | 'ascending' | 'attribute' |
                                                               'case' | 'cast' | 'castable' | 'child' | 'collation' |
                                                               'comment' | 'count' | 'declare' | 'default' |
                                                               'descendant' | 'descendant-or-self' | 'descending' |
                                                               'div' | 'document' | 'document-node' | 'element' |
                                                               'else' | 'empty' | 'empty-sequence' | 'end' | 'eq' |
                                                               'every' | 'except' | 'following' | 'following-sibling' |
                                                               'for' | 'function' | 'ge' | 'group' | 'gt' | 'idiv' |
                                                               'if' | 'import' | 'instance' | 'intersect' | 'is' |
                                                               'item' | 'le' | 'let' | 'lt' | 'mod' | 'module' |
                                                               'namespace' | 'namespace-node' | 'ne' | 'node' | 'only' |
                                                               'or' | 'order' | 'ordered' | 'parent' | 'preceding' |
                                                               'preceding-sibling' | 'processing-instruction' |
                                                               'return' | 'satisfies' | 'schema-attribute' |
                                                               'schema-element' | 'self' | 'some' | 'stable' | 'start' |
                                                               'switch' | 'text' | 'to' | 'treat' | 'try' |
                                                               'typeswitch' | 'union' | 'unordered' | 'validate' |
                                                               'where' | 'xquery' :)
          let $state := p:parse-TypeName($input, $state)
          return $state
        else if ($state[$p:error]) then
          $state
        else
          let $state := p:parse-ValidationMode($input, $state)
          return $state
      return $state
    else
      $state
  let $state := p:lookahead1W(77, $input, $state)           (: S^WS | ('(' ':') | '{' :)
  let $state := p:shift(194, $input, $state)                (: '{' :)
  let $state := p:lookahead1W(31, $input, $state)           (: EPSILON | S^WS | ('(' ':') :)
  let $state := p:parse-Expr($input, $state)
  let $state := p:lookahead1W(78, $input, $state)           (: S^WS | ('(' ':') | '}' :)
  let $state := p:shift(197, $input, $state)                (: '}' :)
  return p:reduce($state, "ValidateExpr", $count)
};

(:~
 : Parse ValueExpr.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-ValueExpr($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state :=
    if ($state[$p:l1] = 186) then                           (: 'validate' :)
      let $state := p:lookahead2W(201, $input, $state)      (: EOF | S^WS | '!=' | '#' | '(' | ('(' ':') | ')' | '*' |
                                                               '+' | ',' | '-' | '/' | '//' | ';' | '<' | '<<' | '<=' |
                                                               '=' | '>' | '>=' | '>>' | '[' | ']' | 'and' |
                                                               'ascending' | 'case' | 'cast' | 'castable' |
                                                               'collation' | 'count' | 'default' | 'descending' |
                                                               'div' | 'else' | 'empty' | 'end' | 'eq' | 'except' |
                                                               'for' | 'ge' | 'group' | 'gt' | 'idiv' | 'instance' |
                                                               'intersect' | 'is' | 'lax' | 'le' | 'let' | 'lt' |
                                                               'mod' | 'ne' | 'only' | 'or' | 'order' | 'return' |
                                                               'satisfies' | 'stable' | 'start' | 'strict' | 'to' |
                                                               'treat' | 'type' | 'union' | 'where' | '{' | '|' | '}' :)
      return $state
    else
      ($state[$p:l1], subsequence($state, $p:lk + 1))
  let $state :=
    if ($state[$p:lk] = 33978                               (: 'validate' 'lax' :)
     or $state[$p:lk] = 44474                               (: 'validate' 'strict' :)
     or $state[$p:lk] = 46778                               (: 'validate' 'type' :)
     or $state[$p:lk] = 49850) then                         (: 'validate' '{' :)
      let $state := p:parse-ValidateExpr($input, $state)
      return $state
    else if ($state[$p:lk] = 34) then                       (: '(#' :)
      let $state := p:parse-ExtensionExpr($input, $state)
      return $state
    else if ($state[$p:error]) then
      $state
    else
      let $state := p:parse-PathExpr($input, $state)
      return $state
  return p:reduce($state, "ValueExpr", $count)
};

(:~
 : Parse the 1st loop of production UnaryExpr (zero or more). Use
 : tail recursion for iteratively updating the parser state.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-UnaryExpr-1($input as xs:string, $state as item()+) as item()+
{
  if ($state[$p:error]) then
    $state
  else
    let $state := p:lookahead1W(216, $input, $state)        (: Wildcard | EQName^Token | IntegerLiteral |
                                                               DecimalLiteral | DoubleLiteral | StringLiteral | S^WS |
                                                               '$' | '(' | '(#' | ('(' ':') | '+' | '-' | '.' | '..' |
                                                               '/' | '//' | '<' | '<!--' | '<?' | '@' | 'ancestor' |
                                                               'ancestor-or-self' | 'and' | 'ascending' | 'attribute' |
                                                               'case' | 'cast' | 'castable' | 'child' | 'collation' |
                                                               'comment' | 'count' | 'declare' | 'default' |
                                                               'descendant' | 'descendant-or-self' | 'descending' |
                                                               'div' | 'document' | 'document-node' | 'element' |
                                                               'else' | 'empty' | 'empty-sequence' | 'end' | 'eq' |
                                                               'every' | 'except' | 'following' | 'following-sibling' |
                                                               'for' | 'function' | 'ge' | 'group' | 'gt' | 'idiv' |
                                                               'if' | 'import' | 'instance' | 'intersect' | 'is' |
                                                               'item' | 'le' | 'let' | 'lt' | 'mod' | 'module' |
                                                               'namespace' | 'namespace-node' | 'ne' | 'node' | 'only' |
                                                               'or' | 'order' | 'ordered' | 'parent' | 'preceding' |
                                                               'preceding-sibling' | 'processing-instruction' |
                                                               'return' | 'satisfies' | 'schema-attribute' |
                                                               'schema-element' | 'self' | 'some' | 'stable' | 'start' |
                                                               'switch' | 'text' | 'to' | 'treat' | 'try' |
                                                               'typeswitch' | 'union' | 'unordered' | 'validate' |
                                                               'where' | 'xquery' :)
    return
      if ($state[$p:l1] != 39                               (: '+' :)
      and $state[$p:l1] != 41) then                         (: '-' :)
        $state
      else
        let $state :=
          if ($state[$p:l1] = 41) then                      (: '-' :)
            let $state := p:shift(41, $input, $state)       (: '-' :)
            return $state
          else if ($state[$p:error]) then
            $state
          else
            let $state := p:shift(39, $input, $state)       (: '+' :)
            return $state
        return p:parse-UnaryExpr-1($input, $state)
};

(:~
 : Parse UnaryExpr.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-UnaryExpr($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:parse-UnaryExpr-1($input, $state)
  let $state := p:parse-ValueExpr($input, $state)
  return p:reduce($state, "UnaryExpr", $count)
};

(:~
 : Parse CastExpr.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-CastExpr($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:parse-UnaryExpr($input, $state)
  let $state := p:lookahead1W(185, $input, $state)          (: EOF | S^WS | '!=' | ('(' ':') | ')' | '*' | '+' | ',' |
                                                               '-' | ';' | '<' | '<<' | '<=' | '=' | '>' | '>=' | '>>' |
                                                               ']' | 'and' | 'ascending' | 'case' | 'cast' |
                                                               'castable' | 'collation' | 'count' | 'default' |
                                                               'descending' | 'div' | 'else' | 'empty' | 'end' | 'eq' |
                                                               'except' | 'for' | 'ge' | 'group' | 'gt' | 'idiv' |
                                                               'instance' | 'intersect' | 'is' | 'le' | 'let' | 'lt' |
                                                               'mod' | 'ne' | 'only' | 'or' | 'order' | 'return' |
                                                               'satisfies' | 'stable' | 'start' | 'to' | 'treat' |
                                                               'union' | 'where' | '|' | '}' :)
  let $state :=
    if ($state[$p:error]) then
      $state
    else if ($state[$p:l1] = 82) then                       (: 'cast' :)
      let $state := p:shift(82, $input, $state)             (: 'cast' :)
      let $state := p:lookahead1W(49, $input, $state)       (: S^WS | ('(' ':') | 'as' :)
      let $state := p:shift(74, $input, $state)             (: 'as' :)
      let $state := p:lookahead1W(31, $input, $state)       (: EPSILON | S^WS | ('(' ':') :)
      let $state := p:parse-SingleType($input, $state)
      return $state
    else
      $state
  return p:reduce($state, "CastExpr", $count)
};

(:~
 : Parse CastableExpr.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-CastableExpr($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:parse-CastExpr($input, $state)
  let $state := p:lookahead1W(183, $input, $state)          (: EOF | S^WS | '!=' | ('(' ':') | ')' | '*' | '+' | ',' |
                                                               '-' | ';' | '<' | '<<' | '<=' | '=' | '>' | '>=' | '>>' |
                                                               ']' | 'and' | 'ascending' | 'case' | 'castable' |
                                                               'collation' | 'count' | 'default' | 'descending' |
                                                               'div' | 'else' | 'empty' | 'end' | 'eq' | 'except' |
                                                               'for' | 'ge' | 'group' | 'gt' | 'idiv' | 'instance' |
                                                               'intersect' | 'is' | 'le' | 'let' | 'lt' | 'mod' | 'ne' |
                                                               'only' | 'or' | 'order' | 'return' | 'satisfies' |
                                                               'stable' | 'start' | 'to' | 'treat' | 'union' | 'where' |
                                                               '|' | '}' :)
  let $state :=
    if ($state[$p:error]) then
      $state
    else if ($state[$p:l1] = 83) then                       (: 'castable' :)
      let $state := p:shift(83, $input, $state)             (: 'castable' :)
      let $state := p:lookahead1W(49, $input, $state)       (: S^WS | ('(' ':') | 'as' :)
      let $state := p:shift(74, $input, $state)             (: 'as' :)
      let $state := p:lookahead1W(31, $input, $state)       (: EPSILON | S^WS | ('(' ':') :)
      let $state := p:parse-SingleType($input, $state)
      return $state
    else
      $state
  return p:reduce($state, "CastableExpr", $count)
};

(:~
 : Parse TreatExpr.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-TreatExpr($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:parse-CastableExpr($input, $state)
  let $state := p:lookahead1W(182, $input, $state)          (: EOF | S^WS | '!=' | ('(' ':') | ')' | '*' | '+' | ',' |
                                                               '-' | ';' | '<' | '<<' | '<=' | '=' | '>' | '>=' | '>>' |
                                                               ']' | 'and' | 'ascending' | 'case' | 'collation' |
                                                               'count' | 'default' | 'descending' | 'div' | 'else' |
                                                               'empty' | 'end' | 'eq' | 'except' | 'for' | 'ge' |
                                                               'group' | 'gt' | 'idiv' | 'instance' | 'intersect' |
                                                               'is' | 'le' | 'let' | 'lt' | 'mod' | 'ne' | 'only' |
                                                               'or' | 'order' | 'return' | 'satisfies' | 'stable' |
                                                               'start' | 'to' | 'treat' | 'union' | 'where' | '|' | '}' :)
  let $state :=
    if ($state[$p:error]) then
      $state
    else if ($state[$p:l1] = 179) then                      (: 'treat' :)
      let $state := p:shift(179, $input, $state)            (: 'treat' :)
      let $state := p:lookahead1W(49, $input, $state)       (: S^WS | ('(' ':') | 'as' :)
      let $state := p:shift(74, $input, $state)             (: 'as' :)
      let $state := p:lookahead1W(31, $input, $state)       (: EPSILON | S^WS | ('(' ':') :)
      let $state := p:parse-SequenceType($input, $state)
      return $state
    else
      $state
  return p:reduce($state, "TreatExpr", $count)
};

(:~
 : Parse InstanceofExpr.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-InstanceofExpr($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:parse-TreatExpr($input, $state)
  let $state := p:lookahead1W(181, $input, $state)          (: EOF | S^WS | '!=' | ('(' ':') | ')' | '*' | '+' | ',' |
                                                               '-' | ';' | '<' | '<<' | '<=' | '=' | '>' | '>=' | '>>' |
                                                               ']' | 'and' | 'ascending' | 'case' | 'collation' |
                                                               'count' | 'default' | 'descending' | 'div' | 'else' |
                                                               'empty' | 'end' | 'eq' | 'except' | 'for' | 'ge' |
                                                               'group' | 'gt' | 'idiv' | 'instance' | 'intersect' |
                                                               'is' | 'le' | 'let' | 'lt' | 'mod' | 'ne' | 'only' |
                                                               'or' | 'order' | 'return' | 'satisfies' | 'stable' |
                                                               'start' | 'to' | 'union' | 'where' | '|' | '}' :)
  let $state :=
    if ($state[$p:error]) then
      $state
    else if ($state[$p:l1] = 128) then                      (: 'instance' :)
      let $state := p:shift(128, $input, $state)            (: 'instance' :)
      let $state := p:lookahead1W(68, $input, $state)       (: S^WS | ('(' ':') | 'of' :)
      let $state := p:shift(147, $input, $state)            (: 'of' :)
      let $state := p:lookahead1W(31, $input, $state)       (: EPSILON | S^WS | ('(' ':') :)
      let $state := p:parse-SequenceType($input, $state)
      return $state
    else
      $state
  return p:reduce($state, "InstanceofExpr", $count)
};

(:~
 : Parse the 1st loop of production IntersectExceptExpr (zero or more). Use
 : tail recursion for iteratively updating the parser state.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-IntersectExceptExpr-1($input as xs:string, $state as item()+) as item()+
{
  if ($state[$p:error]) then
    $state
  else
    let $state := p:lookahead1W(180, $input, $state)        (: EOF | S^WS | '!=' | ('(' ':') | ')' | '*' | '+' | ',' |
                                                               '-' | ';' | '<' | '<<' | '<=' | '=' | '>' | '>=' | '>>' |
                                                               ']' | 'and' | 'ascending' | 'case' | 'collation' |
                                                               'count' | 'default' | 'descending' | 'div' | 'else' |
                                                               'empty' | 'end' | 'eq' | 'except' | 'for' | 'ge' |
                                                               'group' | 'gt' | 'idiv' | 'intersect' | 'is' | 'le' |
                                                               'let' | 'lt' | 'mod' | 'ne' | 'only' | 'or' | 'order' |
                                                               'return' | 'satisfies' | 'stable' | 'start' | 'to' |
                                                               'union' | 'where' | '|' | '}' :)
    return
      if ($state[$p:l1] != 111                              (: 'except' :)
      and $state[$p:l1] != 129) then                        (: 'intersect' :)
        $state
      else
        let $state :=
          if ($state[$p:l1] = 129) then                     (: 'intersect' :)
            let $state := p:shift(129, $input, $state)      (: 'intersect' :)
            return $state
          else if ($state[$p:error]) then
            $state
          else
            let $state := p:shift(111, $input, $state)      (: 'except' :)
            return $state
        let $state := p:lookahead1W(31, $input, $state)     (: EPSILON | S^WS | ('(' ':') :)
        let $state := p:parse-InstanceofExpr($input, $state)
        return p:parse-IntersectExceptExpr-1($input, $state)
};

(:~
 : Parse IntersectExceptExpr.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-IntersectExceptExpr($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:parse-InstanceofExpr($input, $state)
  let $state := p:parse-IntersectExceptExpr-1($input, $state)
  return p:reduce($state, "IntersectExceptExpr", $count)
};

(:~
 : Parse the 1st loop of production UnionExpr (zero or more). Use
 : tail recursion for iteratively updating the parser state.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-UnionExpr-1($input as xs:string, $state as item()+) as item()+
{
  if ($state[$p:error]) then
    $state
  else
    let $state := p:lookahead1W(178, $input, $state)        (: EOF | S^WS | '!=' | ('(' ':') | ')' | '*' | '+' | ',' |
                                                               '-' | ';' | '<' | '<<' | '<=' | '=' | '>' | '>=' | '>>' |
                                                               ']' | 'and' | 'ascending' | 'case' | 'collation' |
                                                               'count' | 'default' | 'descending' | 'div' | 'else' |
                                                               'empty' | 'end' | 'eq' | 'for' | 'ge' | 'group' | 'gt' |
                                                               'idiv' | 'is' | 'le' | 'let' | 'lt' | 'mod' | 'ne' |
                                                               'only' | 'or' | 'order' | 'return' | 'satisfies' |
                                                               'stable' | 'start' | 'to' | 'union' | 'where' | '|' | '}' :)
    return
      if ($state[$p:l1] != 184                              (: 'union' :)
      and $state[$p:l1] != 196) then                        (: '|' :)
        $state
      else
        let $state :=
          if ($state[$p:l1] = 184) then                     (: 'union' :)
            let $state := p:shift(184, $input, $state)      (: 'union' :)
            return $state
          else if ($state[$p:error]) then
            $state
          else
            let $state := p:shift(196, $input, $state)      (: '|' :)
            return $state
        let $state := p:lookahead1W(31, $input, $state)     (: EPSILON | S^WS | ('(' ':') :)
        let $state := p:parse-IntersectExceptExpr($input, $state)
        return p:parse-UnionExpr-1($input, $state)
};

(:~
 : Parse UnionExpr.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-UnionExpr($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:parse-IntersectExceptExpr($input, $state)
  let $state := p:parse-UnionExpr-1($input, $state)
  return p:reduce($state, "UnionExpr", $count)
};

(:~
 : Parse the 1st loop of production MultiplicativeExpr (zero or more). Use
 : tail recursion for iteratively updating the parser state.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-MultiplicativeExpr-1($input as xs:string, $state as item()+) as item()+
{
  if ($state[$p:error]) then
    $state
  else
    let $state := p:lookahead1W(177, $input, $state)        (: EOF | S^WS | '!=' | ('(' ':') | ')' | '*' | '+' | ',' |
                                                               '-' | ';' | '<' | '<<' | '<=' | '=' | '>' | '>=' | '>>' |
                                                               ']' | 'and' | 'ascending' | 'case' | 'collation' |
                                                               'count' | 'default' | 'descending' | 'div' | 'else' |
                                                               'empty' | 'end' | 'eq' | 'for' | 'ge' | 'group' | 'gt' |
                                                               'idiv' | 'is' | 'le' | 'let' | 'lt' | 'mod' | 'ne' |
                                                               'only' | 'or' | 'order' | 'return' | 'satisfies' |
                                                               'stable' | 'start' | 'to' | 'where' | '}' :)
    return
      if ($state[$p:l1] != 37                               (: '*' :)
      and $state[$p:l1] != 100                              (: 'div' :)
      and $state[$p:l1] != 122                              (: 'idiv' :)
      and $state[$p:l1] != 138) then                        (: 'mod' :)
        $state
      else
        let $state :=
          if ($state[$p:l1] = 37) then                      (: '*' :)
            let $state := p:shift(37, $input, $state)       (: '*' :)
            return $state
          else if ($state[$p:l1] = 100) then                (: 'div' :)
            let $state := p:shift(100, $input, $state)      (: 'div' :)
            return $state
          else if ($state[$p:l1] = 122) then                (: 'idiv' :)
            let $state := p:shift(122, $input, $state)      (: 'idiv' :)
            return $state
          else if ($state[$p:error]) then
            $state
          else
            let $state := p:shift(138, $input, $state)      (: 'mod' :)
            return $state
        let $state := p:lookahead1W(31, $input, $state)     (: EPSILON | S^WS | ('(' ':') :)
        let $state := p:parse-UnionExpr($input, $state)
        return p:parse-MultiplicativeExpr-1($input, $state)
};

(:~
 : Parse MultiplicativeExpr.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-MultiplicativeExpr($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:parse-UnionExpr($input, $state)
  let $state := p:parse-MultiplicativeExpr-1($input, $state)
  return p:reduce($state, "MultiplicativeExpr", $count)
};

(:~
 : Parse the 1st loop of production AdditiveExpr (zero or more). Use
 : tail recursion for iteratively updating the parser state.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-AdditiveExpr-1($input as xs:string, $state as item()+) as item()+
{
  if ($state[$p:error]) then
    $state
  else
    let $state := p:lookahead1W(176, $input, $state)        (: EOF | S^WS | '!=' | ('(' ':') | ')' | '+' | ',' | '-' |
                                                               ';' | '<' | '<<' | '<=' | '=' | '>' | '>=' | '>>' | ']' |
                                                               'and' | 'ascending' | 'case' | 'collation' | 'count' |
                                                               'default' | 'descending' | 'else' | 'empty' | 'end' |
                                                               'eq' | 'for' | 'ge' | 'group' | 'gt' | 'is' | 'le' |
                                                               'let' | 'lt' | 'ne' | 'only' | 'or' | 'order' |
                                                               'return' | 'satisfies' | 'stable' | 'start' | 'to' |
                                                               'where' | '}' :)
    return
      if ($state[$p:l1] != 39                               (: '+' :)
      and $state[$p:l1] != 41) then                         (: '-' :)
        $state
      else
        let $state :=
          if ($state[$p:l1] = 39) then                      (: '+' :)
            let $state := p:shift(39, $input, $state)       (: '+' :)
            return $state
          else if ($state[$p:error]) then
            $state
          else
            let $state := p:shift(41, $input, $state)       (: '-' :)
            return $state
        let $state := p:lookahead1W(31, $input, $state)     (: EPSILON | S^WS | ('(' ':') :)
        let $state := p:parse-MultiplicativeExpr($input, $state)
        return p:parse-AdditiveExpr-1($input, $state)
};

(:~
 : Parse AdditiveExpr.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-AdditiveExpr($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:parse-MultiplicativeExpr($input, $state)
  let $state := p:parse-AdditiveExpr-1($input, $state)
  return p:reduce($state, "AdditiveExpr", $count)
};

(:~
 : Parse RangeExpr.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-RangeExpr($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:parse-AdditiveExpr($input, $state)
  let $state := p:lookahead1W(173, $input, $state)          (: EOF | S^WS | '!=' | ('(' ':') | ')' | ',' | ';' | '<' |
                                                               '<<' | '<=' | '=' | '>' | '>=' | '>>' | ']' | 'and' |
                                                               'ascending' | 'case' | 'collation' | 'count' |
                                                               'default' | 'descending' | 'else' | 'empty' | 'end' |
                                                               'eq' | 'for' | 'ge' | 'group' | 'gt' | 'is' | 'le' |
                                                               'let' | 'lt' | 'ne' | 'only' | 'or' | 'order' |
                                                               'return' | 'satisfies' | 'stable' | 'start' | 'to' |
                                                               'where' | '}' :)
  let $state :=
    if ($state[$p:error]) then
      $state
    else if ($state[$p:l1] = 178) then                      (: 'to' :)
      let $state := p:shift(178, $input, $state)            (: 'to' :)
      let $state := p:lookahead1W(31, $input, $state)       (: EPSILON | S^WS | ('(' ':') :)
      let $state := p:parse-AdditiveExpr($input, $state)
      return $state
    else
      $state
  return p:reduce($state, "RangeExpr", $count)
};

(:~
 : Parse ComparisonExpr.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-ComparisonExpr($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:parse-RangeExpr($input, $state)
  let $state := p:lookahead1W(170, $input, $state)          (: EOF | S^WS | '!=' | ('(' ':') | ')' | ',' | ';' | '<' |
                                                               '<<' | '<=' | '=' | '>' | '>=' | '>>' | ']' | 'and' |
                                                               'ascending' | 'case' | 'collation' | 'count' |
                                                               'default' | 'descending' | 'else' | 'empty' | 'end' |
                                                               'eq' | 'for' | 'ge' | 'group' | 'gt' | 'is' | 'le' |
                                                               'let' | 'lt' | 'ne' | 'only' | 'or' | 'order' |
                                                               'return' | 'satisfies' | 'stable' | 'start' | 'where' |
                                                               '}' :)
  let $state :=
    if ($state[$p:error]) then
      $state
    else if ($state[$p:l1] = 26                             (: '!=' :)
          or $state[$p:l1] = 52                             (: '<' :)
          or $state[$p:l1] = 56                             (: '<<' :)
          or $state[$p:l1] = 57                             (: '<=' :)
          or $state[$p:l1] = 59                             (: '=' :)
          or $state[$p:l1] = 60                             (: '>' :)
          or $state[$p:l1] = 61                             (: '>=' :)
          or $state[$p:l1] = 62                             (: '>>' :)
          or $state[$p:l1] = 109                            (: 'eq' :)
          or $state[$p:l1] = 117                            (: 'ge' :)
          or $state[$p:l1] = 121                            (: 'gt' :)
          or $state[$p:l1] = 130                            (: 'is' :)
          or $state[$p:l1] = 133                            (: 'le' :)
          or $state[$p:l1] = 136                            (: 'lt' :)
          or $state[$p:l1] = 142) then                      (: 'ne' :)
      let $state :=
        if ($state[$p:l1] = 109                             (: 'eq' :)
         or $state[$p:l1] = 117                             (: 'ge' :)
         or $state[$p:l1] = 121                             (: 'gt' :)
         or $state[$p:l1] = 133                             (: 'le' :)
         or $state[$p:l1] = 136                             (: 'lt' :)
         or $state[$p:l1] = 142) then                       (: 'ne' :)
          let $state := p:parse-ValueComp($input, $state)
          return $state
        else if ($state[$p:l1] = 56                         (: '<<' :)
              or $state[$p:l1] = 62                         (: '>>' :)
              or $state[$p:l1] = 130) then                  (: 'is' :)
          let $state := p:parse-NodeComp($input, $state)
          return $state
        else if ($state[$p:error]) then
          $state
        else
          let $state := p:parse-GeneralComp($input, $state)
          return $state
      let $state := p:lookahead1W(31, $input, $state)       (: EPSILON | S^WS | ('(' ':') :)
      let $state := p:parse-RangeExpr($input, $state)
      return $state
    else
      $state
  return p:reduce($state, "ComparisonExpr", $count)
};

(:~
 : Parse the 1st loop of production AndExpr (zero or more). Use
 : tail recursion for iteratively updating the parser state.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-AndExpr-1($input as xs:string, $state as item()+) as item()+
{
  if ($state[$p:error]) then
    $state
  else
    let $state := p:lookahead1W(163, $input, $state)        (: EOF | S^WS | ('(' ':') | ')' | ',' | ';' | ']' | 'and' |
                                                               'ascending' | 'case' | 'collation' | 'count' |
                                                               'default' | 'descending' | 'else' | 'empty' | 'end' |
                                                               'for' | 'group' | 'let' | 'only' | 'or' | 'order' |
                                                               'return' | 'satisfies' | 'stable' | 'start' | 'where' |
                                                               '}' :)
    return
      if ($state[$p:l1] != 73) then                         (: 'and' :)
        $state
      else
        let $state := p:shift(73, $input, $state)           (: 'and' :)
        let $state := p:lookahead1W(31, $input, $state)     (: EPSILON | S^WS | ('(' ':') :)
        let $state := p:parse-ComparisonExpr($input, $state)
        return p:parse-AndExpr-1($input, $state)
};

(:~
 : Parse AndExpr.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-AndExpr($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:parse-ComparisonExpr($input, $state)
  let $state := p:parse-AndExpr-1($input, $state)
  return p:reduce($state, "AndExpr", $count)
};

(:~
 : Parse the 1st loop of production OrExpr (zero or more). Use
 : tail recursion for iteratively updating the parser state.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-OrExpr-1($input as xs:string, $state as item()+) as item()+
{
  if ($state[$p:error]) then
    $state
  else
    let $state := p:lookahead1W(162, $input, $state)        (: EOF | S^WS | ('(' ':') | ')' | ',' | ';' | ']' |
                                                               'ascending' | 'case' | 'collation' | 'count' |
                                                               'default' | 'descending' | 'else' | 'empty' | 'end' |
                                                               'for' | 'group' | 'let' | 'only' | 'or' | 'order' |
                                                               'return' | 'satisfies' | 'stable' | 'start' | 'where' |
                                                               '}' :)
    return
      if ($state[$p:l1] != 150) then                        (: 'or' :)
        $state
      else
        let $state := p:shift(150, $input, $state)          (: 'or' :)
        let $state := p:lookahead1W(31, $input, $state)     (: EPSILON | S^WS | ('(' ':') :)
        let $state := p:parse-AndExpr($input, $state)
        return p:parse-OrExpr-1($input, $state)
};

(:~
 : Parse OrExpr.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-OrExpr($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:parse-AndExpr($input, $state)
  let $state := p:parse-OrExpr-1($input, $state)
  return p:reduce($state, "OrExpr", $count)
};

(:~
 : Parse NameTest.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-NameTest($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:lookahead1(203, $input, $state)           (: Wildcard | EQName^Token | 'ancestor' |
                                                               'ancestor-or-self' | 'and' | 'ascending' | 'attribute' |
                                                               'case' | 'cast' | 'castable' | 'child' | 'collation' |
                                                               'comment' | 'count' | 'declare' | 'default' |
                                                               'descendant' | 'descendant-or-self' | 'descending' |
                                                               'div' | 'document' | 'document-node' | 'element' |
                                                               'else' | 'empty' | 'empty-sequence' | 'end' | 'eq' |
                                                               'every' | 'except' | 'following' | 'following-sibling' |
                                                               'for' | 'function' | 'ge' | 'group' | 'gt' | 'idiv' |
                                                               'if' | 'import' | 'instance' | 'intersect' | 'is' |
                                                               'item' | 'le' | 'let' | 'lt' | 'mod' | 'module' |
                                                               'namespace' | 'namespace-node' | 'ne' | 'node' | 'only' |
                                                               'or' | 'order' | 'ordered' | 'parent' | 'preceding' |
                                                               'preceding-sibling' | 'processing-instruction' |
                                                               'return' | 'satisfies' | 'schema-attribute' |
                                                               'schema-element' | 'self' | 'some' | 'stable' | 'start' |
                                                               'switch' | 'text' | 'to' | 'treat' | 'try' |
                                                               'typeswitch' | 'union' | 'unordered' | 'validate' |
                                                               'where' | 'xquery' :)
  let $state :=
    if ($state[$p:l1] = 6) then                             (: Wildcard :)
      let $state := p:shift(6, $input, $state)              (: Wildcard :)
      return $state
    else if ($state[$p:error]) then
      $state
    else
      let $state := p:parse-EQName($input, $state)
      return $state
  return p:reduce($state, "NameTest", $count)
};

(:~
 : Parse the 1st loop of production CatchErrorList (zero or more). Use
 : tail recursion for iteratively updating the parser state.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-CatchErrorList-1($input as xs:string, $state as item()+) as item()+
{
  if ($state[$p:error]) then
    $state
  else
    let $state := p:lookahead1W(123, $input, $state)        (: S^WS | ('(' ':') | '{' | '|' :)
    return
      if ($state[$p:l1] != 196) then                        (: '|' :)
        $state
      else
        let $state := p:shift(196, $input, $state)          (: '|' :)
        let $state := p:lookahead1W(206, $input, $state)    (: Wildcard | EQName^Token | S^WS | ('(' ':') | 'ancestor' |
                                                               'ancestor-or-self' | 'and' | 'ascending' | 'attribute' |
                                                               'case' | 'cast' | 'castable' | 'child' | 'collation' |
                                                               'comment' | 'count' | 'declare' | 'default' |
                                                               'descendant' | 'descendant-or-self' | 'descending' |
                                                               'div' | 'document' | 'document-node' | 'element' |
                                                               'else' | 'empty' | 'empty-sequence' | 'end' | 'eq' |
                                                               'every' | 'except' | 'following' | 'following-sibling' |
                                                               'for' | 'function' | 'ge' | 'group' | 'gt' | 'idiv' |
                                                               'if' | 'import' | 'instance' | 'intersect' | 'is' |
                                                               'item' | 'le' | 'let' | 'lt' | 'mod' | 'module' |
                                                               'namespace' | 'namespace-node' | 'ne' | 'node' | 'only' |
                                                               'or' | 'order' | 'ordered' | 'parent' | 'preceding' |
                                                               'preceding-sibling' | 'processing-instruction' |
                                                               'return' | 'satisfies' | 'schema-attribute' |
                                                               'schema-element' | 'self' | 'some' | 'stable' | 'start' |
                                                               'switch' | 'text' | 'to' | 'treat' | 'try' |
                                                               'typeswitch' | 'union' | 'unordered' | 'validate' |
                                                               'where' | 'xquery' :)
        let $state := p:parse-NameTest($input, $state)
        return p:parse-CatchErrorList-1($input, $state)
};

(:~
 : Parse CatchErrorList.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-CatchErrorList($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:lookahead1(203, $input, $state)           (: Wildcard | EQName^Token | 'ancestor' |
                                                               'ancestor-or-self' | 'and' | 'ascending' | 'attribute' |
                                                               'case' | 'cast' | 'castable' | 'child' | 'collation' |
                                                               'comment' | 'count' | 'declare' | 'default' |
                                                               'descendant' | 'descendant-or-self' | 'descending' |
                                                               'div' | 'document' | 'document-node' | 'element' |
                                                               'else' | 'empty' | 'empty-sequence' | 'end' | 'eq' |
                                                               'every' | 'except' | 'following' | 'following-sibling' |
                                                               'for' | 'function' | 'ge' | 'group' | 'gt' | 'idiv' |
                                                               'if' | 'import' | 'instance' | 'intersect' | 'is' |
                                                               'item' | 'le' | 'let' | 'lt' | 'mod' | 'module' |
                                                               'namespace' | 'namespace-node' | 'ne' | 'node' | 'only' |
                                                               'or' | 'order' | 'ordered' | 'parent' | 'preceding' |
                                                               'preceding-sibling' | 'processing-instruction' |
                                                               'return' | 'satisfies' | 'schema-attribute' |
                                                               'schema-element' | 'self' | 'some' | 'stable' | 'start' |
                                                               'switch' | 'text' | 'to' | 'treat' | 'try' |
                                                               'typeswitch' | 'union' | 'unordered' | 'validate' |
                                                               'where' | 'xquery' :)
  let $state := p:parse-NameTest($input, $state)
  let $state := p:parse-CatchErrorList-1($input, $state)
  return p:reduce($state, "CatchErrorList", $count)
};

(:~
 : Parse CatchClause.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-CatchClause($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:lookahead1(16, $input, $state)            (: 'catch' :)
  let $state := p:shift(84, $input, $state)                 (: 'catch' :)
  let $state := p:lookahead1W(31, $input, $state)           (: EPSILON | S^WS | ('(' ':') :)
  let $state := p:parse-CatchErrorList($input, $state)
  let $state := p:lookahead1W(77, $input, $state)           (: S^WS | ('(' ':') | '{' :)
  let $state := p:shift(194, $input, $state)                (: '{' :)
  let $state := p:lookahead1W(31, $input, $state)           (: EPSILON | S^WS | ('(' ':') :)
  let $state := p:parse-Expr($input, $state)
  let $state := p:lookahead1W(78, $input, $state)           (: S^WS | ('(' ':') | '}' :)
  let $state := p:shift(197, $input, $state)                (: '}' :)
  return p:reduce($state, "CatchClause", $count)
};

(:~
 : Parse TryTargetExpr.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-TryTargetExpr($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:parse-Expr($input, $state)
  return p:reduce($state, "TryTargetExpr", $count)
};

(:~
 : Parse TryClause.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-TryClause($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:lookahead1(19, $input, $state)            (: 'try' :)
  let $state := p:shift(180, $input, $state)                (: 'try' :)
  let $state := p:lookahead1W(77, $input, $state)           (: S^WS | ('(' ':') | '{' :)
  let $state := p:shift(194, $input, $state)                (: '{' :)
  let $state := p:lookahead1W(31, $input, $state)           (: EPSILON | S^WS | ('(' ':') :)
  let $state := p:parse-TryTargetExpr($input, $state)
  let $state := p:lookahead1W(78, $input, $state)           (: S^WS | ('(' ':') | '}' :)
  let $state := p:shift(197, $input, $state)                (: '}' :)
  return p:reduce($state, "TryClause", $count)
};

(:~
 : Parse the 1st loop of production TryCatchExpr (one or more). Use
 : tail recursion for iteratively updating the parser state.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-TryCatchExpr-1($input as xs:string, $state as item()+) as item()+
{
  if ($state[$p:error]) then
    $state
  else
    let $state := p:lookahead1W(31, $input, $state)         (: EPSILON | S^WS | ('(' ':') :)
    let $state := p:parse-CatchClause($input, $state)
    let $state := p:lookahead1W(161, $input, $state)        (: EOF | S^WS | ('(' ':') | ')' | ',' | ';' | ']' |
                                                               'ascending' | 'case' | 'catch' | 'collation' | 'count' |
                                                               'default' | 'descending' | 'else' | 'empty' | 'end' |
                                                               'for' | 'group' | 'let' | 'only' | 'order' | 'return' |
                                                               'satisfies' | 'stable' | 'start' | 'where' | '}' :)
    return
      if ($state[$p:l1] != 84) then                         (: 'catch' :)
        $state
      else
        p:parse-TryCatchExpr-1($input, $state)
};

(:~
 : Parse TryCatchExpr.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-TryCatchExpr($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:parse-TryClause($input, $state)
  let $state := p:lookahead1W(31, $input, $state)           (: EPSILON | S^WS | ('(' ':') :)
  let $state := p:parse-TryCatchExpr-1($input, $state)
  return p:reduce($state, "TryCatchExpr", $count)
};

(:~
 : Parse IfExpr.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-IfExpr($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:shift(123, $input, $state)                (: 'if' :)
  let $state := p:lookahead1W(40, $input, $state)           (: S^WS | '(' | ('(' ':') :)
  let $state := p:shift(33, $input, $state)                 (: '(' :)
  let $state := p:lookahead1W(31, $input, $state)           (: EPSILON | S^WS | ('(' ':') :)
  let $state := p:parse-Expr($input, $state)
  let $state := p:lookahead1W(41, $input, $state)           (: S^WS | ('(' ':') | ')' :)
  let $state := p:shift(36, $input, $state)                 (: ')' :)
  let $state := p:lookahead1W(74, $input, $state)           (: S^WS | ('(' ':') | 'then' :)
  let $state := p:shift(177, $input, $state)                (: 'then' :)
  let $state := p:lookahead1W(31, $input, $state)           (: EPSILON | S^WS | ('(' ':') :)
  let $state := p:parse-ExprSingle($input, $state)
  let $state := p:lookahead1W(61, $input, $state)           (: S^WS | ('(' ':') | 'else' :)
  let $state := p:shift(104, $input, $state)                (: 'else' :)
  let $state := p:lookahead1W(31, $input, $state)           (: EPSILON | S^WS | ('(' ':') :)
  let $state := p:parse-ExprSingle($input, $state)
  return p:reduce($state, "IfExpr", $count)
};

(:~
 : Parse the 1st loop of production SequenceTypeUnion (zero or more). Use
 : tail recursion for iteratively updating the parser state.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-SequenceTypeUnion-1($input as xs:string, $state as item()+) as item()+
{
  if ($state[$p:error]) then
    $state
  else
    let $state := p:lookahead1W(121, $input, $state)        (: S^WS | ('(' ':') | 'return' | '|' :)
    return
      if ($state[$p:l1] != 196) then                        (: '|' :)
        $state
      else
        let $state := p:shift(196, $input, $state)          (: '|' :)
        let $state := p:lookahead1W(31, $input, $state)     (: EPSILON | S^WS | ('(' ':') :)
        let $state := p:parse-SequenceType($input, $state)
        return p:parse-SequenceTypeUnion-1($input, $state)
};

(:~
 : Parse SequenceTypeUnion.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-SequenceTypeUnion($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:parse-SequenceType($input, $state)
  let $state := p:parse-SequenceTypeUnion-1($input, $state)
  return p:reduce($state, "SequenceTypeUnion", $count)
};

(:~
 : Parse CaseClause.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-CaseClause($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:lookahead1(15, $input, $state)            (: 'case' :)
  let $state := p:shift(81, $input, $state)                 (: 'case' :)
  let $state := p:lookahead1W(211, $input, $state)          (: EQName^Token | S^WS | '$' | '%' | '(' | ('(' ':') |
                                                               'ancestor' | 'ancestor-or-self' | 'and' | 'ascending' |
                                                               'attribute' | 'case' | 'cast' | 'castable' | 'child' |
                                                               'collation' | 'comment' | 'count' | 'declare' |
                                                               'default' | 'descendant' | 'descendant-or-self' |
                                                               'descending' | 'div' | 'document' | 'document-node' |
                                                               'element' | 'else' | 'empty' | 'empty-sequence' | 'end' |
                                                               'eq' | 'every' | 'except' | 'following' |
                                                               'following-sibling' | 'for' | 'function' | 'ge' |
                                                               'group' | 'gt' | 'idiv' | 'if' | 'import' | 'instance' |
                                                               'intersect' | 'is' | 'item' | 'le' | 'let' | 'lt' |
                                                               'mod' | 'module' | 'namespace' | 'namespace-node' |
                                                               'ne' | 'node' | 'only' | 'or' | 'order' | 'ordered' |
                                                               'parent' | 'preceding' | 'preceding-sibling' |
                                                               'processing-instruction' | 'return' | 'satisfies' |
                                                               'schema-attribute' | 'schema-element' | 'self' | 'some' |
                                                               'stable' | 'start' | 'switch' | 'text' | 'to' | 'treat' |
                                                               'try' | 'typeswitch' | 'union' | 'unordered' |
                                                               'validate' | 'where' | 'xquery' :)
  let $state :=
    if ($state[$p:error]) then
      $state
    else if ($state[$p:l1] = 30) then                       (: '$' :)
      let $state := p:shift(30, $input, $state)             (: '$' :)
      let $state := p:lookahead1W(205, $input, $state)      (: EQName^Token | S^WS | ('(' ':') | 'ancestor' |
                                                               'ancestor-or-self' | 'and' | 'ascending' | 'attribute' |
                                                               'case' | 'cast' | 'castable' | 'child' | 'collation' |
                                                               'comment' | 'count' | 'declare' | 'default' |
                                                               'descendant' | 'descendant-or-self' | 'descending' |
                                                               'div' | 'document' | 'document-node' | 'element' |
                                                               'else' | 'empty' | 'empty-sequence' | 'end' | 'eq' |
                                                               'every' | 'except' | 'following' | 'following-sibling' |
                                                               'for' | 'function' | 'ge' | 'group' | 'gt' | 'idiv' |
                                                               'if' | 'import' | 'instance' | 'intersect' | 'is' |
                                                               'item' | 'le' | 'let' | 'lt' | 'mod' | 'module' |
                                                               'namespace' | 'namespace-node' | 'ne' | 'node' | 'only' |
                                                               'or' | 'order' | 'ordered' | 'parent' | 'preceding' |
                                                               'preceding-sibling' | 'processing-instruction' |
                                                               'return' | 'satisfies' | 'schema-attribute' |
                                                               'schema-element' | 'self' | 'some' | 'stable' | 'start' |
                                                               'switch' | 'text' | 'to' | 'treat' | 'try' |
                                                               'typeswitch' | 'union' | 'unordered' | 'validate' |
                                                               'where' | 'xquery' :)
      let $state := p:parse-VarName($input, $state)
      let $state := p:lookahead1W(49, $input, $state)       (: S^WS | ('(' ':') | 'as' :)
      let $state := p:shift(74, $input, $state)             (: 'as' :)
      return $state
    else
      $state
  let $state := p:lookahead1W(31, $input, $state)           (: EPSILON | S^WS | ('(' ':') :)
  let $state := p:parse-SequenceTypeUnion($input, $state)
  let $state := p:lookahead1W(72, $input, $state)           (: S^WS | ('(' ':') | 'return' :)
  let $state := p:shift(163, $input, $state)                (: 'return' :)
  let $state := p:lookahead1W(31, $input, $state)           (: EPSILON | S^WS | ('(' ':') :)
  let $state := p:parse-ExprSingle($input, $state)
  return p:reduce($state, "CaseClause", $count)
};

(:~
 : Parse the 1st loop of production TypeswitchExpr (one or more). Use
 : tail recursion for iteratively updating the parser state.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-TypeswitchExpr-1($input as xs:string, $state as item()+) as item()+
{
  if ($state[$p:error]) then
    $state
  else
    let $state := p:lookahead1W(31, $input, $state)         (: EPSILON | S^WS | ('(' ':') :)
    let $state := p:parse-CaseClause($input, $state)
    let $state := p:lookahead1W(104, $input, $state)        (: S^WS | ('(' ':') | 'case' | 'default' :)
    return
      if ($state[$p:l1] != 81) then                         (: 'case' :)
        $state
      else
        p:parse-TypeswitchExpr-1($input, $state)
};

(:~
 : Parse TypeswitchExpr.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-TypeswitchExpr($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:shift(183, $input, $state)                (: 'typeswitch' :)
  let $state := p:lookahead1W(40, $input, $state)           (: S^WS | '(' | ('(' ':') :)
  let $state := p:shift(33, $input, $state)                 (: '(' :)
  let $state := p:lookahead1W(31, $input, $state)           (: EPSILON | S^WS | ('(' ':') :)
  let $state := p:parse-Expr($input, $state)
  let $state := p:lookahead1W(41, $input, $state)           (: S^WS | ('(' ':') | ')' :)
  let $state := p:shift(36, $input, $state)                 (: ')' :)
  let $state := p:lookahead1W(31, $input, $state)           (: EPSILON | S^WS | ('(' ':') :)
  let $state := p:parse-TypeswitchExpr-1($input, $state)
  let $state := p:shift(95, $input, $state)                 (: 'default' :)
  let $state := p:lookahead1W(87, $input, $state)           (: S^WS | '$' | ('(' ':') | 'return' :)
  let $state :=
    if ($state[$p:error]) then
      $state
    else if ($state[$p:l1] = 30) then                       (: '$' :)
      let $state := p:shift(30, $input, $state)             (: '$' :)
      let $state := p:lookahead1W(205, $input, $state)      (: EQName^Token | S^WS | ('(' ':') | 'ancestor' |
                                                               'ancestor-or-self' | 'and' | 'ascending' | 'attribute' |
                                                               'case' | 'cast' | 'castable' | 'child' | 'collation' |
                                                               'comment' | 'count' | 'declare' | 'default' |
                                                               'descendant' | 'descendant-or-self' | 'descending' |
                                                               'div' | 'document' | 'document-node' | 'element' |
                                                               'else' | 'empty' | 'empty-sequence' | 'end' | 'eq' |
                                                               'every' | 'except' | 'following' | 'following-sibling' |
                                                               'for' | 'function' | 'ge' | 'group' | 'gt' | 'idiv' |
                                                               'if' | 'import' | 'instance' | 'intersect' | 'is' |
                                                               'item' | 'le' | 'let' | 'lt' | 'mod' | 'module' |
                                                               'namespace' | 'namespace-node' | 'ne' | 'node' | 'only' |
                                                               'or' | 'order' | 'ordered' | 'parent' | 'preceding' |
                                                               'preceding-sibling' | 'processing-instruction' |
                                                               'return' | 'satisfies' | 'schema-attribute' |
                                                               'schema-element' | 'self' | 'some' | 'stable' | 'start' |
                                                               'switch' | 'text' | 'to' | 'treat' | 'try' |
                                                               'typeswitch' | 'union' | 'unordered' | 'validate' |
                                                               'where' | 'xquery' :)
      let $state := p:parse-VarName($input, $state)
      return $state
    else
      $state
  let $state := p:lookahead1W(72, $input, $state)           (: S^WS | ('(' ':') | 'return' :)
  let $state := p:shift(163, $input, $state)                (: 'return' :)
  let $state := p:lookahead1W(31, $input, $state)           (: EPSILON | S^WS | ('(' ':') :)
  let $state := p:parse-ExprSingle($input, $state)
  return p:reduce($state, "TypeswitchExpr", $count)
};

(:~
 : Parse SwitchCaseOperand.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-SwitchCaseOperand($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:parse-ExprSingle($input, $state)
  return p:reduce($state, "SwitchCaseOperand", $count)
};

(:~
 : Parse the 1st loop of production SwitchCaseClause (one or more). Use
 : tail recursion for iteratively updating the parser state.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-SwitchCaseClause-1($input as xs:string, $state as item()+) as item()+
{
  if ($state[$p:error]) then
    $state
  else
    let $state := p:lookahead1W(53, $input, $state)         (: S^WS | ('(' ':') | 'case' :)
    let $state := p:shift(81, $input, $state)               (: 'case' :)
    let $state := p:lookahead1W(31, $input, $state)         (: EPSILON | S^WS | ('(' ':') :)
    let $state := p:parse-SwitchCaseOperand($input, $state)
    let $state := p:lookahead1W(105, $input, $state)        (: S^WS | ('(' ':') | 'case' | 'return' :)
    return
      if ($state[$p:l1] != 81) then                         (: 'case' :)
        $state
      else
        p:parse-SwitchCaseClause-1($input, $state)
};

(:~
 : Parse SwitchCaseClause.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-SwitchCaseClause($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:parse-SwitchCaseClause-1($input, $state)
  let $state := p:shift(163, $input, $state)                (: 'return' :)
  let $state := p:lookahead1W(31, $input, $state)           (: EPSILON | S^WS | ('(' ':') :)
  let $state := p:parse-ExprSingle($input, $state)
  return p:reduce($state, "SwitchCaseClause", $count)
};

(:~
 : Parse the 1st loop of production Expr (zero or more). Use
 : tail recursion for iteratively updating the parser state.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-Expr-1($input as xs:string, $state as item()+) as item()+
{
  if ($state[$p:error]) then
    $state
  else
    let $state := p:lookahead1W(143, $input, $state)        (: EOF | S^WS | ('(' ':') | ')' | ',' | ']' | '}' :)
    return
      if ($state[$p:l1] != 40) then                         (: ',' :)
        $state
      else
        let $state := p:shift(40, $input, $state)           (: ',' :)
        let $state := p:lookahead1W(31, $input, $state)     (: EPSILON | S^WS | ('(' ':') :)
        let $state := p:parse-ExprSingle($input, $state)
        return p:parse-Expr-1($input, $state)
};

(:~
 : Parse Expr.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-Expr($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:parse-ExprSingle($input, $state)
  let $state := p:parse-Expr-1($input, $state)
  return p:reduce($state, "Expr", $count)
};

(:~
 : Parse the 1st loop of production SwitchExpr (one or more). Use
 : tail recursion for iteratively updating the parser state.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-SwitchExpr-1($input as xs:string, $state as item()+) as item()+
{
  if ($state[$p:error]) then
    $state
  else
    let $state := p:lookahead1W(31, $input, $state)         (: EPSILON | S^WS | ('(' ':') :)
    let $state := p:parse-SwitchCaseClause($input, $state)
    let $state := p:lookahead1W(104, $input, $state)        (: S^WS | ('(' ':') | 'case' | 'default' :)
    return
      if ($state[$p:l1] != 81) then                         (: 'case' :)
        $state
      else
        p:parse-SwitchExpr-1($input, $state)
};

(:~
 : Parse SwitchExpr.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-SwitchExpr($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:shift(175, $input, $state)                (: 'switch' :)
  let $state := p:lookahead1W(40, $input, $state)           (: S^WS | '(' | ('(' ':') :)
  let $state := p:shift(33, $input, $state)                 (: '(' :)
  let $state := p:lookahead1W(31, $input, $state)           (: EPSILON | S^WS | ('(' ':') :)
  let $state := p:parse-Expr($input, $state)
  let $state := p:lookahead1W(41, $input, $state)           (: S^WS | ('(' ':') | ')' :)
  let $state := p:shift(36, $input, $state)                 (: ')' :)
  let $state := p:lookahead1W(31, $input, $state)           (: EPSILON | S^WS | ('(' ':') :)
  let $state := p:parse-SwitchExpr-1($input, $state)
  let $state := p:shift(95, $input, $state)                 (: 'default' :)
  let $state := p:lookahead1W(72, $input, $state)           (: S^WS | ('(' ':') | 'return' :)
  let $state := p:shift(163, $input, $state)                (: 'return' :)
  let $state := p:lookahead1W(31, $input, $state)           (: EPSILON | S^WS | ('(' ':') :)
  let $state := p:parse-ExprSingle($input, $state)
  return p:reduce($state, "SwitchExpr", $count)
};

(:~
 : Parse the 1st loop of production QuantifiedExpr (zero or more). Use
 : tail recursion for iteratively updating the parser state.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-QuantifiedExpr-1($input as xs:string, $state as item()+) as item()+
{
  if ($state[$p:error]) then
    $state
  else
    let $state := p:lookahead1W(94, $input, $state)         (: S^WS | ('(' ':') | ',' | 'satisfies' :)
    return
      if ($state[$p:l1] != 40) then                         (: ',' :)
        $state
      else
        let $state := p:shift(40, $input, $state)           (: ',' :)
        let $state := p:lookahead1W(39, $input, $state)     (: S^WS | '$' | ('(' ':') :)
        let $state := p:shift(30, $input, $state)           (: '$' :)
        let $state := p:lookahead1W(205, $input, $state)    (: EQName^Token | S^WS | ('(' ':') | 'ancestor' |
                                                               'ancestor-or-self' | 'and' | 'ascending' | 'attribute' |
                                                               'case' | 'cast' | 'castable' | 'child' | 'collation' |
                                                               'comment' | 'count' | 'declare' | 'default' |
                                                               'descendant' | 'descendant-or-self' | 'descending' |
                                                               'div' | 'document' | 'document-node' | 'element' |
                                                               'else' | 'empty' | 'empty-sequence' | 'end' | 'eq' |
                                                               'every' | 'except' | 'following' | 'following-sibling' |
                                                               'for' | 'function' | 'ge' | 'group' | 'gt' | 'idiv' |
                                                               'if' | 'import' | 'instance' | 'intersect' | 'is' |
                                                               'item' | 'le' | 'let' | 'lt' | 'mod' | 'module' |
                                                               'namespace' | 'namespace-node' | 'ne' | 'node' | 'only' |
                                                               'or' | 'order' | 'ordered' | 'parent' | 'preceding' |
                                                               'preceding-sibling' | 'processing-instruction' |
                                                               'return' | 'satisfies' | 'schema-attribute' |
                                                               'schema-element' | 'self' | 'some' | 'stable' | 'start' |
                                                               'switch' | 'text' | 'to' | 'treat' | 'try' |
                                                               'typeswitch' | 'union' | 'unordered' | 'validate' |
                                                               'where' | 'xquery' :)
        let $state := p:parse-VarName($input, $state)
        let $state := p:lookahead1W(100, $input, $state)    (: S^WS | ('(' ':') | 'as' | 'in' :)
        let $state :=
          if ($state[$p:error]) then
            $state
          else if ($state[$p:l1] = 74) then                 (: 'as' :)
            let $state := p:parse-TypeDeclaration($input, $state)
            return $state
          else
            $state
        let $state := p:lookahead1W(64, $input, $state)     (: S^WS | ('(' ':') | 'in' :)
        let $state := p:shift(125, $input, $state)          (: 'in' :)
        let $state := p:lookahead1W(31, $input, $state)     (: EPSILON | S^WS | ('(' ':') :)
        let $state := p:parse-ExprSingle($input, $state)
        return p:parse-QuantifiedExpr-1($input, $state)
};

(:~
 : Parse QuantifiedExpr.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-QuantifiedExpr($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state :=
    if ($state[$p:l1] = 170) then                           (: 'some' :)
      let $state := p:shift(170, $input, $state)            (: 'some' :)
      return $state
    else if ($state[$p:error]) then
      $state
    else
      let $state := p:shift(110, $input, $state)            (: 'every' :)
      return $state
  let $state := p:lookahead1W(39, $input, $state)           (: S^WS | '$' | ('(' ':') :)
  let $state := p:shift(30, $input, $state)                 (: '$' :)
  let $state := p:lookahead1W(205, $input, $state)          (: EQName^Token | S^WS | ('(' ':') | 'ancestor' |
                                                               'ancestor-or-self' | 'and' | 'ascending' | 'attribute' |
                                                               'case' | 'cast' | 'castable' | 'child' | 'collation' |
                                                               'comment' | 'count' | 'declare' | 'default' |
                                                               'descendant' | 'descendant-or-self' | 'descending' |
                                                               'div' | 'document' | 'document-node' | 'element' |
                                                               'else' | 'empty' | 'empty-sequence' | 'end' | 'eq' |
                                                               'every' | 'except' | 'following' | 'following-sibling' |
                                                               'for' | 'function' | 'ge' | 'group' | 'gt' | 'idiv' |
                                                               'if' | 'import' | 'instance' | 'intersect' | 'is' |
                                                               'item' | 'le' | 'let' | 'lt' | 'mod' | 'module' |
                                                               'namespace' | 'namespace-node' | 'ne' | 'node' | 'only' |
                                                               'or' | 'order' | 'ordered' | 'parent' | 'preceding' |
                                                               'preceding-sibling' | 'processing-instruction' |
                                                               'return' | 'satisfies' | 'schema-attribute' |
                                                               'schema-element' | 'self' | 'some' | 'stable' | 'start' |
                                                               'switch' | 'text' | 'to' | 'treat' | 'try' |
                                                               'typeswitch' | 'union' | 'unordered' | 'validate' |
                                                               'where' | 'xquery' :)
  let $state := p:parse-VarName($input, $state)
  let $state := p:lookahead1W(100, $input, $state)          (: S^WS | ('(' ':') | 'as' | 'in' :)
  let $state :=
    if ($state[$p:error]) then
      $state
    else if ($state[$p:l1] = 74) then                       (: 'as' :)
      let $state := p:parse-TypeDeclaration($input, $state)
      return $state
    else
      $state
  let $state := p:lookahead1W(64, $input, $state)           (: S^WS | ('(' ':') | 'in' :)
  let $state := p:shift(125, $input, $state)                (: 'in' :)
  let $state := p:lookahead1W(31, $input, $state)           (: EPSILON | S^WS | ('(' ':') :)
  let $state := p:parse-ExprSingle($input, $state)
  let $state := p:parse-QuantifiedExpr-1($input, $state)
  let $state := p:shift(164, $input, $state)                (: 'satisfies' :)
  let $state := p:lookahead1W(31, $input, $state)           (: EPSILON | S^WS | ('(' ':') :)
  let $state := p:parse-ExprSingle($input, $state)
  return p:reduce($state, "QuantifiedExpr", $count)
};

(:~
 : Parse ReturnClause.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-ReturnClause($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:shift(163, $input, $state)                (: 'return' :)
  let $state := p:lookahead1W(31, $input, $state)           (: EPSILON | S^WS | ('(' ':') :)
  let $state := p:parse-ExprSingle($input, $state)
  return p:reduce($state, "ReturnClause", $count)
};

(:~
 : Parse CountClause.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-CountClause($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:shift(91, $input, $state)                 (: 'count' :)
  let $state := p:lookahead1W(39, $input, $state)           (: S^WS | '$' | ('(' ':') :)
  let $state := p:shift(30, $input, $state)                 (: '$' :)
  let $state := p:lookahead1W(205, $input, $state)          (: EQName^Token | S^WS | ('(' ':') | 'ancestor' |
                                                               'ancestor-or-self' | 'and' | 'ascending' | 'attribute' |
                                                               'case' | 'cast' | 'castable' | 'child' | 'collation' |
                                                               'comment' | 'count' | 'declare' | 'default' |
                                                               'descendant' | 'descendant-or-self' | 'descending' |
                                                               'div' | 'document' | 'document-node' | 'element' |
                                                               'else' | 'empty' | 'empty-sequence' | 'end' | 'eq' |
                                                               'every' | 'except' | 'following' | 'following-sibling' |
                                                               'for' | 'function' | 'ge' | 'group' | 'gt' | 'idiv' |
                                                               'if' | 'import' | 'instance' | 'intersect' | 'is' |
                                                               'item' | 'le' | 'let' | 'lt' | 'mod' | 'module' |
                                                               'namespace' | 'namespace-node' | 'ne' | 'node' | 'only' |
                                                               'or' | 'order' | 'ordered' | 'parent' | 'preceding' |
                                                               'preceding-sibling' | 'processing-instruction' |
                                                               'return' | 'satisfies' | 'schema-attribute' |
                                                               'schema-element' | 'self' | 'some' | 'stable' | 'start' |
                                                               'switch' | 'text' | 'to' | 'treat' | 'try' |
                                                               'typeswitch' | 'union' | 'unordered' | 'validate' |
                                                               'where' | 'xquery' :)
  let $state := p:parse-VarName($input, $state)
  return p:reduce($state, "CountClause", $count)
};

(:~
 : Parse OrderModifier.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-OrderModifier($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:lookahead1W(160, $input, $state)          (: S^WS | ('(' ':') | ',' | 'ascending' | 'collation' |
                                                               'count' | 'descending' | 'empty' | 'for' | 'group' |
                                                               'let' | 'order' | 'return' | 'stable' | 'where' :)
  let $state :=
    if ($state[$p:error]) then
      $state
    else if ($state[$p:l1] = 75                             (: 'ascending' :)
          or $state[$p:l1] = 98) then                       (: 'descending' :)
      let $state :=
        if ($state[$p:l1] = 75) then                        (: 'ascending' :)
          let $state := p:shift(75, $input, $state)         (: 'ascending' :)
          return $state
        else if ($state[$p:error]) then
          $state
        else
          let $state := p:shift(98, $input, $state)         (: 'descending' :)
          return $state
      return $state
    else
      $state
  let $state := p:lookahead1W(157, $input, $state)          (: S^WS | ('(' ':') | ',' | 'collation' | 'count' |
                                                               'empty' | 'for' | 'group' | 'let' | 'order' | 'return' |
                                                               'stable' | 'where' :)
  let $state :=
    if ($state[$p:error]) then
      $state
    else if ($state[$p:l1] = 105) then                      (: 'empty' :)
      let $state := p:shift(105, $input, $state)            (: 'empty' :)
      let $state := p:lookahead1W(112, $input, $state)      (: S^WS | ('(' ':') | 'greatest' | 'least' :)
      let $state :=
        if ($state[$p:l1] = 118) then                       (: 'greatest' :)
          let $state := p:shift(118, $input, $state)        (: 'greatest' :)
          return $state
        else if ($state[$p:error]) then
          $state
        else
          let $state := p:shift(134, $input, $state)        (: 'least' :)
          return $state
      return $state
    else
      $state
  let $state := p:lookahead1W(155, $input, $state)          (: S^WS | ('(' ':') | ',' | 'collation' | 'count' | 'for' |
                                                               'group' | 'let' | 'order' | 'return' | 'stable' | 'where' :)
  let $state :=
    if ($state[$p:error]) then
      $state
    else if ($state[$p:l1] = 86) then                       (: 'collation' :)
      let $state := p:shift(86, $input, $state)             (: 'collation' :)
      let $state := p:lookahead1W(33, $input, $state)       (: URILiteral | S^WS | ('(' ':') :)
      let $state := p:shift(8, $input, $state)              (: URILiteral :)
      return $state
    else
      $state
  return p:reduce($state, "OrderModifier", $count)
};

(:~
 : Parse OrderSpec.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-OrderSpec($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:parse-ExprSingle($input, $state)
  let $state := p:lookahead1W(31, $input, $state)           (: EPSILON | S^WS | ('(' ':') :)
  let $state := p:parse-OrderModifier($input, $state)
  return p:reduce($state, "OrderSpec", $count)
};

(:~
 : Parse the 1st loop of production OrderSpecList (zero or more). Use
 : tail recursion for iteratively updating the parser state.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-OrderSpecList-1($input as xs:string, $state as item()+) as item()+
{
  if ($state[$p:error]) then
    $state
  else
    let $state := p:lookahead1W(154, $input, $state)        (: S^WS | ('(' ':') | ',' | 'count' | 'for' | 'group' |
                                                               'let' | 'order' | 'return' | 'stable' | 'where' :)
    return
      if ($state[$p:l1] != 40) then                         (: ',' :)
        $state
      else
        let $state := p:shift(40, $input, $state)           (: ',' :)
        let $state := p:lookahead1W(31, $input, $state)     (: EPSILON | S^WS | ('(' ':') :)
        let $state := p:parse-OrderSpec($input, $state)
        return p:parse-OrderSpecList-1($input, $state)
};

(:~
 : Parse OrderSpecList.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-OrderSpecList($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:parse-OrderSpec($input, $state)
  let $state := p:parse-OrderSpecList-1($input, $state)
  return p:reduce($state, "OrderSpecList", $count)
};

(:~
 : Parse OrderByClause.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-OrderByClause($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state :=
    if ($state[$p:l1] = 151) then                           (: 'order' :)
      let $state := p:shift(151, $input, $state)            (: 'order' :)
      let $state := p:lookahead1W(52, $input, $state)       (: S^WS | ('(' ':') | 'by' :)
      let $state := p:shift(80, $input, $state)             (: 'by' :)
      return $state
    else if ($state[$p:error]) then
      $state
    else
      let $state := p:shift(171, $input, $state)            (: 'stable' :)
      let $state := p:lookahead1W(70, $input, $state)       (: S^WS | ('(' ':') | 'order' :)
      let $state := p:shift(151, $input, $state)            (: 'order' :)
      let $state := p:lookahead1W(52, $input, $state)       (: S^WS | ('(' ':') | 'by' :)
      let $state := p:shift(80, $input, $state)             (: 'by' :)
      return $state
  let $state := p:lookahead1W(31, $input, $state)           (: EPSILON | S^WS | ('(' ':') :)
  let $state := p:parse-OrderSpecList($input, $state)
  return p:reduce($state, "OrderByClause", $count)
};

(:~
 : Parse GroupingSpec.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-GroupingSpec($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:lookahead1(7, $input, $state)             (: '$' :)
  let $state := p:shift(30, $input, $state)                 (: '$' :)
  let $state := p:lookahead1W(205, $input, $state)          (: EQName^Token | S^WS | ('(' ':') | 'ancestor' |
                                                               'ancestor-or-self' | 'and' | 'ascending' | 'attribute' |
                                                               'case' | 'cast' | 'castable' | 'child' | 'collation' |
                                                               'comment' | 'count' | 'declare' | 'default' |
                                                               'descendant' | 'descendant-or-self' | 'descending' |
                                                               'div' | 'document' | 'document-node' | 'element' |
                                                               'else' | 'empty' | 'empty-sequence' | 'end' | 'eq' |
                                                               'every' | 'except' | 'following' | 'following-sibling' |
                                                               'for' | 'function' | 'ge' | 'group' | 'gt' | 'idiv' |
                                                               'if' | 'import' | 'instance' | 'intersect' | 'is' |
                                                               'item' | 'le' | 'let' | 'lt' | 'mod' | 'module' |
                                                               'namespace' | 'namespace-node' | 'ne' | 'node' | 'only' |
                                                               'or' | 'order' | 'ordered' | 'parent' | 'preceding' |
                                                               'preceding-sibling' | 'processing-instruction' |
                                                               'return' | 'satisfies' | 'schema-attribute' |
                                                               'schema-element' | 'self' | 'some' | 'stable' | 'start' |
                                                               'switch' | 'text' | 'to' | 'treat' | 'try' |
                                                               'typeswitch' | 'union' | 'unordered' | 'validate' |
                                                               'where' | 'xquery' :)
  let $state := p:parse-VarName($input, $state)
  let $state := p:lookahead1W(155, $input, $state)          (: S^WS | ('(' ':') | ',' | 'collation' | 'count' | 'for' |
                                                               'group' | 'let' | 'order' | 'return' | 'stable' | 'where' :)
  let $state :=
    if ($state[$p:error]) then
      $state
    else if ($state[$p:l1] = 86) then                       (: 'collation' :)
      let $state := p:shift(86, $input, $state)             (: 'collation' :)
      let $state := p:lookahead1W(33, $input, $state)       (: URILiteral | S^WS | ('(' ':') :)
      let $state := p:shift(8, $input, $state)              (: URILiteral :)
      return $state
    else
      $state
  return p:reduce($state, "GroupingSpec", $count)
};

(:~
 : Parse the 1st loop of production GroupingSpecList (zero or more). Use
 : tail recursion for iteratively updating the parser state.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-GroupingSpecList-1($input as xs:string, $state as item()+) as item()+
{
  if ($state[$p:error]) then
    $state
  else
    let $state := p:lookahead1W(154, $input, $state)        (: S^WS | ('(' ':') | ',' | 'count' | 'for' | 'group' |
                                                               'let' | 'order' | 'return' | 'stable' | 'where' :)
    return
      if ($state[$p:l1] != 40) then                         (: ',' :)
        $state
      else
        let $state := p:shift(40, $input, $state)           (: ',' :)
        let $state := p:lookahead1W(31, $input, $state)     (: EPSILON | S^WS | ('(' ':') :)
        let $state := p:parse-GroupingSpec($input, $state)
        return p:parse-GroupingSpecList-1($input, $state)
};

(:~
 : Parse GroupingSpecList.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-GroupingSpecList($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:parse-GroupingSpec($input, $state)
  let $state := p:parse-GroupingSpecList-1($input, $state)
  return p:reduce($state, "GroupingSpecList", $count)
};

(:~
 : Parse GroupByClause.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-GroupByClause($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:shift(119, $input, $state)                (: 'group' :)
  let $state := p:lookahead1W(52, $input, $state)           (: S^WS | ('(' ':') | 'by' :)
  let $state := p:shift(80, $input, $state)                 (: 'by' :)
  let $state := p:lookahead1W(31, $input, $state)           (: EPSILON | S^WS | ('(' ':') :)
  let $state := p:parse-GroupingSpecList($input, $state)
  return p:reduce($state, "GroupByClause", $count)
};

(:~
 : Parse WhereClause.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-WhereClause($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:shift(190, $input, $state)                (: 'where' :)
  let $state := p:lookahead1W(31, $input, $state)           (: EPSILON | S^WS | ('(' ':') :)
  let $state := p:parse-ExprSingle($input, $state)
  return p:reduce($state, "WhereClause", $count)
};

(:~
 : Parse IntermediateClause.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-IntermediateClause($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state :=
    if ($state[$p:l1] = 115                                 (: 'for' :)
     or $state[$p:l1] = 135) then                           (: 'let' :)
      let $state := p:parse-InitialClause($input, $state)
      return $state
    else if ($state[$p:l1] = 190) then                      (: 'where' :)
      let $state := p:parse-WhereClause($input, $state)
      return $state
    else if ($state[$p:l1] = 119) then                      (: 'group' :)
      let $state := p:parse-GroupByClause($input, $state)
      return $state
    else if ($state[$p:l1] = 91) then                       (: 'count' :)
      let $state := p:parse-CountClause($input, $state)
      return $state
    else if ($state[$p:error]) then
      $state
    else
      let $state := p:parse-OrderByClause($input, $state)
      return $state
  return p:reduce($state, "IntermediateClause", $count)
};

(:~
 : Parse SlidingWindowClause.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-SlidingWindowClause($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:shift(169, $input, $state)                (: 'sliding' :)
  let $state := p:lookahead1W(76, $input, $state)           (: S^WS | ('(' ':') | 'window' :)
  let $state := p:shift(191, $input, $state)                (: 'window' :)
  let $state := p:lookahead1W(39, $input, $state)           (: S^WS | '$' | ('(' ':') :)
  let $state := p:shift(30, $input, $state)                 (: '$' :)
  let $state := p:lookahead1W(205, $input, $state)          (: EQName^Token | S^WS | ('(' ':') | 'ancestor' |
                                                               'ancestor-or-self' | 'and' | 'ascending' | 'attribute' |
                                                               'case' | 'cast' | 'castable' | 'child' | 'collation' |
                                                               'comment' | 'count' | 'declare' | 'default' |
                                                               'descendant' | 'descendant-or-self' | 'descending' |
                                                               'div' | 'document' | 'document-node' | 'element' |
                                                               'else' | 'empty' | 'empty-sequence' | 'end' | 'eq' |
                                                               'every' | 'except' | 'following' | 'following-sibling' |
                                                               'for' | 'function' | 'ge' | 'group' | 'gt' | 'idiv' |
                                                               'if' | 'import' | 'instance' | 'intersect' | 'is' |
                                                               'item' | 'le' | 'let' | 'lt' | 'mod' | 'module' |
                                                               'namespace' | 'namespace-node' | 'ne' | 'node' | 'only' |
                                                               'or' | 'order' | 'ordered' | 'parent' | 'preceding' |
                                                               'preceding-sibling' | 'processing-instruction' |
                                                               'return' | 'satisfies' | 'schema-attribute' |
                                                               'schema-element' | 'self' | 'some' | 'stable' | 'start' |
                                                               'switch' | 'text' | 'to' | 'treat' | 'try' |
                                                               'typeswitch' | 'union' | 'unordered' | 'validate' |
                                                               'where' | 'xquery' :)
  let $state := p:parse-VarName($input, $state)
  let $state := p:lookahead1W(100, $input, $state)          (: S^WS | ('(' ':') | 'as' | 'in' :)
  let $state :=
    if ($state[$p:error]) then
      $state
    else if ($state[$p:l1] = 74) then                       (: 'as' :)
      let $state := p:parse-TypeDeclaration($input, $state)
      return $state
    else
      $state
  let $state := p:lookahead1W(64, $input, $state)           (: S^WS | ('(' ':') | 'in' :)
  let $state := p:shift(125, $input, $state)                (: 'in' :)
  let $state := p:lookahead1W(31, $input, $state)           (: EPSILON | S^WS | ('(' ':') :)
  let $state := p:parse-ExprSingle($input, $state)
  let $state := p:lookahead1W(31, $input, $state)           (: EPSILON | S^WS | ('(' ':') :)
  let $state := p:parse-WindowStartCondition($input, $state)
  let $state := p:lookahead1W(31, $input, $state)           (: EPSILON | S^WS | ('(' ':') :)
  let $state := p:parse-WindowEndCondition($input, $state)
  return p:reduce($state, "SlidingWindowClause", $count)
};

(:~
 : Parse WindowEndCondition.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-WindowEndCondition($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:lookahead1W(109, $input, $state)          (: S^WS | ('(' ':') | 'end' | 'only' :)
  let $state :=
    if ($state[$p:error]) then
      $state
    else if ($state[$p:l1] = 148) then                      (: 'only' :)
      let $state := p:shift(148, $input, $state)            (: 'only' :)
      return $state
    else
      $state
  let $state := p:lookahead1W(63, $input, $state)           (: S^WS | ('(' ':') | 'end' :)
  let $state := p:shift(108, $input, $state)                (: 'end' :)
  let $state := p:lookahead1W(31, $input, $state)           (: EPSILON | S^WS | ('(' ':') :)
  let $state := p:parse-WindowVars($input, $state)
  let $state := p:lookahead1W(75, $input, $state)           (: S^WS | ('(' ':') | 'when' :)
  let $state := p:shift(189, $input, $state)                (: 'when' :)
  let $state := p:lookahead1W(31, $input, $state)           (: EPSILON | S^WS | ('(' ':') :)
  let $state := p:parse-ExprSingle($input, $state)
  return p:reduce($state, "WindowEndCondition", $count)
};

(:~
 : Parse NextItem.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-NextItem($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:parse-EQName($input, $state)
  return p:reduce($state, "NextItem", $count)
};

(:~
 : Parse PreviousItem.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-PreviousItem($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:parse-EQName($input, $state)
  return p:reduce($state, "PreviousItem", $count)
};

(:~
 : Parse CurrentItem.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-CurrentItem($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:parse-EQName($input, $state)
  return p:reduce($state, "CurrentItem", $count)
};

(:~
 : Parse WindowVars.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-WindowVars($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:lookahead1W(144, $input, $state)          (: S^WS | '$' | ('(' ':') | 'at' | 'next' | 'previous' |
                                                               'when' :)
  let $state :=
    if ($state[$p:error]) then
      $state
    else if ($state[$p:l1] = 30) then                       (: '$' :)
      let $state := p:shift(30, $input, $state)             (: '$' :)
      let $state := p:lookahead1W(205, $input, $state)      (: EQName^Token | S^WS | ('(' ':') | 'ancestor' |
                                                               'ancestor-or-self' | 'and' | 'ascending' | 'attribute' |
                                                               'case' | 'cast' | 'castable' | 'child' | 'collation' |
                                                               'comment' | 'count' | 'declare' | 'default' |
                                                               'descendant' | 'descendant-or-self' | 'descending' |
                                                               'div' | 'document' | 'document-node' | 'element' |
                                                               'else' | 'empty' | 'empty-sequence' | 'end' | 'eq' |
                                                               'every' | 'except' | 'following' | 'following-sibling' |
                                                               'for' | 'function' | 'ge' | 'group' | 'gt' | 'idiv' |
                                                               'if' | 'import' | 'instance' | 'intersect' | 'is' |
                                                               'item' | 'le' | 'let' | 'lt' | 'mod' | 'module' |
                                                               'namespace' | 'namespace-node' | 'ne' | 'node' | 'only' |
                                                               'or' | 'order' | 'ordered' | 'parent' | 'preceding' |
                                                               'preceding-sibling' | 'processing-instruction' |
                                                               'return' | 'satisfies' | 'schema-attribute' |
                                                               'schema-element' | 'self' | 'some' | 'stable' | 'start' |
                                                               'switch' | 'text' | 'to' | 'treat' | 'try' |
                                                               'typeswitch' | 'union' | 'unordered' | 'validate' |
                                                               'where' | 'xquery' :)
      let $state := p:parse-CurrentItem($input, $state)
      return $state
    else
      $state
  let $state := p:lookahead1W(141, $input, $state)          (: S^WS | ('(' ':') | 'at' | 'next' | 'previous' | 'when' :)
  let $state :=
    if ($state[$p:error]) then
      $state
    else if ($state[$p:l1] = 76) then                       (: 'at' :)
      let $state := p:parse-PositionalVar($input, $state)
      return $state
    else
      $state
  let $state := p:lookahead1W(136, $input, $state)          (: S^WS | ('(' ':') | 'next' | 'previous' | 'when' :)
  let $state :=
    if ($state[$p:error]) then
      $state
    else if ($state[$p:l1] = 161) then                      (: 'previous' :)
      let $state := p:shift(161, $input, $state)            (: 'previous' :)
      let $state := p:lookahead1W(39, $input, $state)       (: S^WS | '$' | ('(' ':') :)
      let $state := p:shift(30, $input, $state)             (: '$' :)
      let $state := p:lookahead1W(205, $input, $state)      (: EQName^Token | S^WS | ('(' ':') | 'ancestor' |
                                                               'ancestor-or-self' | 'and' | 'ascending' | 'attribute' |
                                                               'case' | 'cast' | 'castable' | 'child' | 'collation' |
                                                               'comment' | 'count' | 'declare' | 'default' |
                                                               'descendant' | 'descendant-or-self' | 'descending' |
                                                               'div' | 'document' | 'document-node' | 'element' |
                                                               'else' | 'empty' | 'empty-sequence' | 'end' | 'eq' |
                                                               'every' | 'except' | 'following' | 'following-sibling' |
                                                               'for' | 'function' | 'ge' | 'group' | 'gt' | 'idiv' |
                                                               'if' | 'import' | 'instance' | 'intersect' | 'is' |
                                                               'item' | 'le' | 'let' | 'lt' | 'mod' | 'module' |
                                                               'namespace' | 'namespace-node' | 'ne' | 'node' | 'only' |
                                                               'or' | 'order' | 'ordered' | 'parent' | 'preceding' |
                                                               'preceding-sibling' | 'processing-instruction' |
                                                               'return' | 'satisfies' | 'schema-attribute' |
                                                               'schema-element' | 'self' | 'some' | 'stable' | 'start' |
                                                               'switch' | 'text' | 'to' | 'treat' | 'try' |
                                                               'typeswitch' | 'union' | 'unordered' | 'validate' |
                                                               'where' | 'xquery' :)
      let $state := p:parse-PreviousItem($input, $state)
      return $state
    else
      $state
  let $state := p:lookahead1W(115, $input, $state)          (: S^WS | ('(' ':') | 'next' | 'when' :)
  let $state :=
    if ($state[$p:error]) then
      $state
    else if ($state[$p:l1] = 143) then                      (: 'next' :)
      let $state := p:shift(143, $input, $state)            (: 'next' :)
      let $state := p:lookahead1W(39, $input, $state)       (: S^WS | '$' | ('(' ':') :)
      let $state := p:shift(30, $input, $state)             (: '$' :)
      let $state := p:lookahead1W(205, $input, $state)      (: EQName^Token | S^WS | ('(' ':') | 'ancestor' |
                                                               'ancestor-or-self' | 'and' | 'ascending' | 'attribute' |
                                                               'case' | 'cast' | 'castable' | 'child' | 'collation' |
                                                               'comment' | 'count' | 'declare' | 'default' |
                                                               'descendant' | 'descendant-or-self' | 'descending' |
                                                               'div' | 'document' | 'document-node' | 'element' |
                                                               'else' | 'empty' | 'empty-sequence' | 'end' | 'eq' |
                                                               'every' | 'except' | 'following' | 'following-sibling' |
                                                               'for' | 'function' | 'ge' | 'group' | 'gt' | 'idiv' |
                                                               'if' | 'import' | 'instance' | 'intersect' | 'is' |
                                                               'item' | 'le' | 'let' | 'lt' | 'mod' | 'module' |
                                                               'namespace' | 'namespace-node' | 'ne' | 'node' | 'only' |
                                                               'or' | 'order' | 'ordered' | 'parent' | 'preceding' |
                                                               'preceding-sibling' | 'processing-instruction' |
                                                               'return' | 'satisfies' | 'schema-attribute' |
                                                               'schema-element' | 'self' | 'some' | 'stable' | 'start' |
                                                               'switch' | 'text' | 'to' | 'treat' | 'try' |
                                                               'typeswitch' | 'union' | 'unordered' | 'validate' |
                                                               'where' | 'xquery' :)
      let $state := p:parse-NextItem($input, $state)
      return $state
    else
      $state
  return p:reduce($state, "WindowVars", $count)
};

(:~
 : Parse WindowStartCondition.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-WindowStartCondition($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:lookahead1(18, $input, $state)            (: 'start' :)
  let $state := p:shift(172, $input, $state)                (: 'start' :)
  let $state := p:lookahead1W(31, $input, $state)           (: EPSILON | S^WS | ('(' ':') :)
  let $state := p:parse-WindowVars($input, $state)
  let $state := p:lookahead1W(75, $input, $state)           (: S^WS | ('(' ':') | 'when' :)
  let $state := p:shift(189, $input, $state)                (: 'when' :)
  let $state := p:lookahead1W(31, $input, $state)           (: EPSILON | S^WS | ('(' ':') :)
  let $state := p:parse-ExprSingle($input, $state)
  return p:reduce($state, "WindowStartCondition", $count)
};

(:~
 : Parse TumblingWindowClause.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-TumblingWindowClause($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:shift(181, $input, $state)                (: 'tumbling' :)
  let $state := p:lookahead1W(76, $input, $state)           (: S^WS | ('(' ':') | 'window' :)
  let $state := p:shift(191, $input, $state)                (: 'window' :)
  let $state := p:lookahead1W(39, $input, $state)           (: S^WS | '$' | ('(' ':') :)
  let $state := p:shift(30, $input, $state)                 (: '$' :)
  let $state := p:lookahead1W(205, $input, $state)          (: EQName^Token | S^WS | ('(' ':') | 'ancestor' |
                                                               'ancestor-or-self' | 'and' | 'ascending' | 'attribute' |
                                                               'case' | 'cast' | 'castable' | 'child' | 'collation' |
                                                               'comment' | 'count' | 'declare' | 'default' |
                                                               'descendant' | 'descendant-or-self' | 'descending' |
                                                               'div' | 'document' | 'document-node' | 'element' |
                                                               'else' | 'empty' | 'empty-sequence' | 'end' | 'eq' |
                                                               'every' | 'except' | 'following' | 'following-sibling' |
                                                               'for' | 'function' | 'ge' | 'group' | 'gt' | 'idiv' |
                                                               'if' | 'import' | 'instance' | 'intersect' | 'is' |
                                                               'item' | 'le' | 'let' | 'lt' | 'mod' | 'module' |
                                                               'namespace' | 'namespace-node' | 'ne' | 'node' | 'only' |
                                                               'or' | 'order' | 'ordered' | 'parent' | 'preceding' |
                                                               'preceding-sibling' | 'processing-instruction' |
                                                               'return' | 'satisfies' | 'schema-attribute' |
                                                               'schema-element' | 'self' | 'some' | 'stable' | 'start' |
                                                               'switch' | 'text' | 'to' | 'treat' | 'try' |
                                                               'typeswitch' | 'union' | 'unordered' | 'validate' |
                                                               'where' | 'xquery' :)
  let $state := p:parse-VarName($input, $state)
  let $state := p:lookahead1W(100, $input, $state)          (: S^WS | ('(' ':') | 'as' | 'in' :)
  let $state :=
    if ($state[$p:error]) then
      $state
    else if ($state[$p:l1] = 74) then                       (: 'as' :)
      let $state := p:parse-TypeDeclaration($input, $state)
      return $state
    else
      $state
  let $state := p:lookahead1W(64, $input, $state)           (: S^WS | ('(' ':') | 'in' :)
  let $state := p:shift(125, $input, $state)                (: 'in' :)
  let $state := p:lookahead1W(31, $input, $state)           (: EPSILON | S^WS | ('(' ':') :)
  let $state := p:parse-ExprSingle($input, $state)
  let $state := p:lookahead1W(31, $input, $state)           (: EPSILON | S^WS | ('(' ':') :)
  let $state := p:parse-WindowStartCondition($input, $state)
  let $state := p:lookahead1W(156, $input, $state)          (: S^WS | ('(' ':') | 'count' | 'end' | 'for' | 'group' |
                                                               'let' | 'only' | 'order' | 'return' | 'stable' | 'where' :)
  let $state :=
    if ($state[$p:error]) then
      $state
    else if ($state[$p:l1] = 108                            (: 'end' :)
          or $state[$p:l1] = 148) then                      (: 'only' :)
      let $state := p:parse-WindowEndCondition($input, $state)
      return $state
    else
      $state
  return p:reduce($state, "TumblingWindowClause", $count)
};

(:~
 : Parse WindowClause.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-WindowClause($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:shift(115, $input, $state)                (: 'for' :)
  let $state := p:lookahead1W(122, $input, $state)          (: S^WS | ('(' ':') | 'sliding' | 'tumbling' :)
  let $state :=
    if ($state[$p:l1] = 181) then                           (: 'tumbling' :)
      let $state := p:parse-TumblingWindowClause($input, $state)
      return $state
    else if ($state[$p:error]) then
      $state
    else
      let $state := p:parse-SlidingWindowClause($input, $state)
      return $state
  return p:reduce($state, "WindowClause", $count)
};

(:~
 : Parse LetBinding.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-LetBinding($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:lookahead1(7, $input, $state)             (: '$' :)
  let $state := p:shift(30, $input, $state)                 (: '$' :)
  let $state := p:lookahead1W(205, $input, $state)          (: EQName^Token | S^WS | ('(' ':') | 'ancestor' |
                                                               'ancestor-or-self' | 'and' | 'ascending' | 'attribute' |
                                                               'case' | 'cast' | 'castable' | 'child' | 'collation' |
                                                               'comment' | 'count' | 'declare' | 'default' |
                                                               'descendant' | 'descendant-or-self' | 'descending' |
                                                               'div' | 'document' | 'document-node' | 'element' |
                                                               'else' | 'empty' | 'empty-sequence' | 'end' | 'eq' |
                                                               'every' | 'except' | 'following' | 'following-sibling' |
                                                               'for' | 'function' | 'ge' | 'group' | 'gt' | 'idiv' |
                                                               'if' | 'import' | 'instance' | 'intersect' | 'is' |
                                                               'item' | 'le' | 'let' | 'lt' | 'mod' | 'module' |
                                                               'namespace' | 'namespace-node' | 'ne' | 'node' | 'only' |
                                                               'or' | 'order' | 'ordered' | 'parent' | 'preceding' |
                                                               'preceding-sibling' | 'processing-instruction' |
                                                               'return' | 'satisfies' | 'schema-attribute' |
                                                               'schema-element' | 'self' | 'some' | 'stable' | 'start' |
                                                               'switch' | 'text' | 'to' | 'treat' | 'try' |
                                                               'typeswitch' | 'union' | 'unordered' | 'validate' |
                                                               'where' | 'xquery' :)
  let $state := p:parse-VarName($input, $state)
  let $state := p:lookahead1W(96, $input, $state)           (: S^WS | ('(' ':') | ':=' | 'as' :)
  let $state :=
    if ($state[$p:error]) then
      $state
    else if ($state[$p:l1] = 74) then                       (: 'as' :)
      let $state := p:parse-TypeDeclaration($input, $state)
      return $state
    else
      $state
  let $state := p:lookahead1W(45, $input, $state)           (: S^WS | ('(' ':') | ':=' :)
  let $state := p:shift(50, $input, $state)                 (: ':=' :)
  let $state := p:lookahead1W(31, $input, $state)           (: EPSILON | S^WS | ('(' ':') :)
  let $state := p:parse-ExprSingle($input, $state)
  return p:reduce($state, "LetBinding", $count)
};

(:~
 : Parse the 1st loop of production LetClause (zero or more). Use
 : tail recursion for iteratively updating the parser state.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-LetClause-1($input as xs:string, $state as item()+) as item()+
{
  if ($state[$p:error]) then
    $state
  else
    let $state := p:lookahead1W(154, $input, $state)        (: S^WS | ('(' ':') | ',' | 'count' | 'for' | 'group' |
                                                               'let' | 'order' | 'return' | 'stable' | 'where' :)
    return
      if ($state[$p:l1] != 40) then                         (: ',' :)
        $state
      else
        let $state := p:shift(40, $input, $state)           (: ',' :)
        let $state := p:lookahead1W(31, $input, $state)     (: EPSILON | S^WS | ('(' ':') :)
        let $state := p:parse-LetBinding($input, $state)
        return p:parse-LetClause-1($input, $state)
};

(:~
 : Parse LetClause.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-LetClause($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:shift(135, $input, $state)                (: 'let' :)
  let $state := p:lookahead1W(31, $input, $state)           (: EPSILON | S^WS | ('(' ':') :)
  let $state := p:parse-LetBinding($input, $state)
  let $state := p:parse-LetClause-1($input, $state)
  return p:reduce($state, "LetClause", $count)
};

(:~
 : Parse PositionalVar.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-PositionalVar($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:shift(76, $input, $state)                 (: 'at' :)
  let $state := p:lookahead1W(39, $input, $state)           (: S^WS | '$' | ('(' ':') :)
  let $state := p:shift(30, $input, $state)                 (: '$' :)
  let $state := p:lookahead1W(205, $input, $state)          (: EQName^Token | S^WS | ('(' ':') | 'ancestor' |
                                                               'ancestor-or-self' | 'and' | 'ascending' | 'attribute' |
                                                               'case' | 'cast' | 'castable' | 'child' | 'collation' |
                                                               'comment' | 'count' | 'declare' | 'default' |
                                                               'descendant' | 'descendant-or-self' | 'descending' |
                                                               'div' | 'document' | 'document-node' | 'element' |
                                                               'else' | 'empty' | 'empty-sequence' | 'end' | 'eq' |
                                                               'every' | 'except' | 'following' | 'following-sibling' |
                                                               'for' | 'function' | 'ge' | 'group' | 'gt' | 'idiv' |
                                                               'if' | 'import' | 'instance' | 'intersect' | 'is' |
                                                               'item' | 'le' | 'let' | 'lt' | 'mod' | 'module' |
                                                               'namespace' | 'namespace-node' | 'ne' | 'node' | 'only' |
                                                               'or' | 'order' | 'ordered' | 'parent' | 'preceding' |
                                                               'preceding-sibling' | 'processing-instruction' |
                                                               'return' | 'satisfies' | 'schema-attribute' |
                                                               'schema-element' | 'self' | 'some' | 'stable' | 'start' |
                                                               'switch' | 'text' | 'to' | 'treat' | 'try' |
                                                               'typeswitch' | 'union' | 'unordered' | 'validate' |
                                                               'where' | 'xquery' :)
  let $state := p:parse-VarName($input, $state)
  return p:reduce($state, "PositionalVar", $count)
};

(:~
 : Parse AllowingEmpty.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-AllowingEmpty($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:shift(70, $input, $state)                 (: 'allowing' :)
  let $state := p:lookahead1W(62, $input, $state)           (: S^WS | ('(' ':') | 'empty' :)
  let $state := p:shift(105, $input, $state)                (: 'empty' :)
  return p:reduce($state, "AllowingEmpty", $count)
};

(:~
 : Parse TypeDeclaration.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-TypeDeclaration($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:shift(74, $input, $state)                 (: 'as' :)
  let $state := p:lookahead1W(31, $input, $state)           (: EPSILON | S^WS | ('(' ':') :)
  let $state := p:parse-SequenceType($input, $state)
  return p:reduce($state, "TypeDeclaration", $count)
};

(:~
 : Parse VarName.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-VarName($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:parse-EQName($input, $state)
  return p:reduce($state, "VarName", $count)
};

(:~
 : Parse ForBinding.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-ForBinding($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:lookahead1(7, $input, $state)             (: '$' :)
  let $state := p:shift(30, $input, $state)                 (: '$' :)
  let $state := p:lookahead1W(205, $input, $state)          (: EQName^Token | S^WS | ('(' ':') | 'ancestor' |
                                                               'ancestor-or-self' | 'and' | 'ascending' | 'attribute' |
                                                               'case' | 'cast' | 'castable' | 'child' | 'collation' |
                                                               'comment' | 'count' | 'declare' | 'default' |
                                                               'descendant' | 'descendant-or-self' | 'descending' |
                                                               'div' | 'document' | 'document-node' | 'element' |
                                                               'else' | 'empty' | 'empty-sequence' | 'end' | 'eq' |
                                                               'every' | 'except' | 'following' | 'following-sibling' |
                                                               'for' | 'function' | 'ge' | 'group' | 'gt' | 'idiv' |
                                                               'if' | 'import' | 'instance' | 'intersect' | 'is' |
                                                               'item' | 'le' | 'let' | 'lt' | 'mod' | 'module' |
                                                               'namespace' | 'namespace-node' | 'ne' | 'node' | 'only' |
                                                               'or' | 'order' | 'ordered' | 'parent' | 'preceding' |
                                                               'preceding-sibling' | 'processing-instruction' |
                                                               'return' | 'satisfies' | 'schema-attribute' |
                                                               'schema-element' | 'self' | 'some' | 'stable' | 'start' |
                                                               'switch' | 'text' | 'to' | 'treat' | 'try' |
                                                               'typeswitch' | 'union' | 'unordered' | 'validate' |
                                                               'where' | 'xquery' :)
  let $state := p:parse-VarName($input, $state)
  let $state := p:lookahead1W(140, $input, $state)          (: S^WS | ('(' ':') | 'allowing' | 'as' | 'at' | 'in' :)
  let $state :=
    if ($state[$p:error]) then
      $state
    else if ($state[$p:l1] = 74) then                       (: 'as' :)
      let $state := p:parse-TypeDeclaration($input, $state)
      return $state
    else
      $state
  let $state := p:lookahead1W(132, $input, $state)          (: S^WS | ('(' ':') | 'allowing' | 'at' | 'in' :)
  let $state :=
    if ($state[$p:error]) then
      $state
    else if ($state[$p:l1] = 70) then                       (: 'allowing' :)
      let $state := p:parse-AllowingEmpty($input, $state)
      return $state
    else
      $state
  let $state := p:lookahead1W(102, $input, $state)          (: S^WS | ('(' ':') | 'at' | 'in' :)
  let $state :=
    if ($state[$p:error]) then
      $state
    else if ($state[$p:l1] = 76) then                       (: 'at' :)
      let $state := p:parse-PositionalVar($input, $state)
      return $state
    else
      $state
  let $state := p:lookahead1W(64, $input, $state)           (: S^WS | ('(' ':') | 'in' :)
  let $state := p:shift(125, $input, $state)                (: 'in' :)
  let $state := p:lookahead1W(31, $input, $state)           (: EPSILON | S^WS | ('(' ':') :)
  let $state := p:parse-ExprSingle($input, $state)
  return p:reduce($state, "ForBinding", $count)
};

(:~
 : Parse the 1st loop of production ForClause (zero or more). Use
 : tail recursion for iteratively updating the parser state.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-ForClause-1($input as xs:string, $state as item()+) as item()+
{
  if ($state[$p:error]) then
    $state
  else
    let $state := p:lookahead1W(154, $input, $state)        (: S^WS | ('(' ':') | ',' | 'count' | 'for' | 'group' |
                                                               'let' | 'order' | 'return' | 'stable' | 'where' :)
    return
      if ($state[$p:l1] != 40) then                         (: ',' :)
        $state
      else
        let $state := p:shift(40, $input, $state)           (: ',' :)
        let $state := p:lookahead1W(31, $input, $state)     (: EPSILON | S^WS | ('(' ':') :)
        let $state := p:parse-ForBinding($input, $state)
        return p:parse-ForClause-1($input, $state)
};

(:~
 : Parse ForClause.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-ForClause($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:shift(115, $input, $state)                (: 'for' :)
  let $state := p:lookahead1W(31, $input, $state)           (: EPSILON | S^WS | ('(' ':') :)
  let $state := p:parse-ForBinding($input, $state)
  let $state := p:parse-ForClause-1($input, $state)
  return p:reduce($state, "ForClause", $count)
};

(:~
 : Parse InitialClause.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-InitialClause($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:lookahead1(28, $input, $state)            (: 'for' | 'let' :)
  let $state :=
    if ($state[$p:l1] = 115) then                           (: 'for' :)
      let $state := p:lookahead2W(127, $input, $state)      (: S^WS | '$' | ('(' ':') | 'sliding' | 'tumbling' :)
      return $state
    else
      ($state[$p:l1], subsequence($state, $p:lk + 1))
  let $state :=
    if ($state[$p:lk] = 7795) then                          (: 'for' '$' :)
      let $state := p:parse-ForClause($input, $state)
      return $state
    else if ($state[$p:lk] = 135) then                      (: 'let' :)
      let $state := p:parse-LetClause($input, $state)
      return $state
    else if ($state[$p:error]) then
      $state
    else
      let $state := p:parse-WindowClause($input, $state)
      return $state
  return p:reduce($state, "InitialClause", $count)
};

(:~
 : Parse the 1st loop of production FLWORExpr (zero or more). Use
 : tail recursion for iteratively updating the parser state.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-FLWORExpr-1($input as xs:string, $state as item()+) as item()+
{
  if ($state[$p:error]) then
    $state
  else
    let $state := p:lookahead1W(152, $input, $state)        (: S^WS | ('(' ':') | 'count' | 'for' | 'group' | 'let' |
                                                               'order' | 'return' | 'stable' | 'where' :)
    return
      if ($state[$p:l1] = 163) then                         (: 'return' :)
        $state
      else
        let $state := p:parse-IntermediateClause($input, $state)
        return p:parse-FLWORExpr-1($input, $state)
};

(:~
 : Parse FLWORExpr.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-FLWORExpr($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:parse-InitialClause($input, $state)
  let $state := p:parse-FLWORExpr-1($input, $state)
  let $state := p:parse-ReturnClause($input, $state)
  return p:reduce($state, "FLWORExpr", $count)
};

(:~
 : Parse ExprSingle.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-ExprSingle($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:lookahead1W(216, $input, $state)          (: Wildcard | EQName^Token | IntegerLiteral |
                                                               DecimalLiteral | DoubleLiteral | StringLiteral | S^WS |
                                                               '$' | '(' | '(#' | ('(' ':') | '+' | '-' | '.' | '..' |
                                                               '/' | '//' | '<' | '<!--' | '<?' | '@' | 'ancestor' |
                                                               'ancestor-or-self' | 'and' | 'ascending' | 'attribute' |
                                                               'case' | 'cast' | 'castable' | 'child' | 'collation' |
                                                               'comment' | 'count' | 'declare' | 'default' |
                                                               'descendant' | 'descendant-or-self' | 'descending' |
                                                               'div' | 'document' | 'document-node' | 'element' |
                                                               'else' | 'empty' | 'empty-sequence' | 'end' | 'eq' |
                                                               'every' | 'except' | 'following' | 'following-sibling' |
                                                               'for' | 'function' | 'ge' | 'group' | 'gt' | 'idiv' |
                                                               'if' | 'import' | 'instance' | 'intersect' | 'is' |
                                                               'item' | 'le' | 'let' | 'lt' | 'mod' | 'module' |
                                                               'namespace' | 'namespace-node' | 'ne' | 'node' | 'only' |
                                                               'or' | 'order' | 'ordered' | 'parent' | 'preceding' |
                                                               'preceding-sibling' | 'processing-instruction' |
                                                               'return' | 'satisfies' | 'schema-attribute' |
                                                               'schema-element' | 'self' | 'some' | 'stable' | 'start' |
                                                               'switch' | 'text' | 'to' | 'treat' | 'try' |
                                                               'typeswitch' | 'union' | 'unordered' | 'validate' |
                                                               'where' | 'xquery' :)
  let $state :=
    if ($state[$p:l1] = 115) then                           (: 'for' :)
      let $state := p:lookahead2W(200, $input, $state)      (: EOF | S^WS | '!=' | '#' | '$' | '(' | ('(' ':') | ')' |
                                                               '*' | '+' | ',' | '-' | '/' | '//' | ';' | '<' | '<<' |
                                                               '<=' | '=' | '>' | '>=' | '>>' | '[' | ']' | 'and' |
                                                               'ascending' | 'case' | 'cast' | 'castable' |
                                                               'collation' | 'count' | 'default' | 'descending' |
                                                               'div' | 'else' | 'empty' | 'end' | 'eq' | 'except' |
                                                               'for' | 'ge' | 'group' | 'gt' | 'idiv' | 'instance' |
                                                               'intersect' | 'is' | 'le' | 'let' | 'lt' | 'mod' | 'ne' |
                                                               'only' | 'or' | 'order' | 'return' | 'satisfies' |
                                                               'sliding' | 'stable' | 'start' | 'to' | 'treat' |
                                                               'tumbling' | 'union' | 'where' | '|' | '}' :)
      return $state
    else if ($state[$p:l1] = 180) then                      (: 'try' :)
      let $state := p:lookahead2W(197, $input, $state)      (: EOF | S^WS | '!=' | '#' | '(' | ('(' ':') | ')' | '*' |
                                                               '+' | ',' | '-' | '/' | '//' | ';' | '<' | '<<' | '<=' |
                                                               '=' | '>' | '>=' | '>>' | '[' | ']' | 'and' |
                                                               'ascending' | 'case' | 'cast' | 'castable' |
                                                               'collation' | 'count' | 'default' | 'descending' |
                                                               'div' | 'else' | 'empty' | 'end' | 'eq' | 'except' |
                                                               'for' | 'ge' | 'group' | 'gt' | 'idiv' | 'instance' |
                                                               'intersect' | 'is' | 'le' | 'let' | 'lt' | 'mod' | 'ne' |
                                                               'only' | 'or' | 'order' | 'return' | 'satisfies' |
                                                               'stable' | 'start' | 'to' | 'treat' | 'union' | 'where' |
                                                               '{' | '|' | '}' :)
      return $state
    else if ($state[$p:l1] = 110                            (: 'let' :)
          or $state[$p:l1] = 135                            (: 'some' :)
          or $state[$p:l1] = 170) then                      (: 'some' :)
      let $state := p:lookahead2W(195, $input, $state)      (: EOF | S^WS | '!=' | '#' | '$' | '(' | ('(' ':') | ')' |
                                                               '*' | '+' | ',' | '-' | '/' | '//' | ';' | '<' | '<<' |
                                                               '<=' | '=' | '>' | '>=' | '>>' | '[' | ']' | 'and' |
                                                               'ascending' | 'case' | 'cast' | 'castable' |
                                                               'collation' | 'count' | 'default' | 'descending' |
                                                               'div' | 'else' | 'empty' | 'end' | 'eq' | 'except' |
                                                               'for' | 'ge' | 'group' | 'gt' | 'idiv' | 'instance' |
                                                               'intersect' | 'is' | 'le' | 'let' | 'lt' | 'mod' | 'ne' |
                                                               'only' | 'or' | 'order' | 'return' | 'satisfies' |
                                                               'stable' | 'start' | 'to' | 'treat' | 'union' | 'where' |
                                                               '|' | '}' :)
      return $state
    else if ($state[$p:l1] = 123                            (: 'switch' :)
          or $state[$p:l1] = 175                            (: 'typeswitch' :)
          or $state[$p:l1] = 183) then                      (: 'typeswitch' :)
      let $state := p:lookahead2W(192, $input, $state)      (: EOF | S^WS | '!=' | '#' | '(' | ('(' ':') | ')' | '*' |
                                                               '+' | ',' | '-' | '/' | '//' | ';' | '<' | '<<' | '<=' |
                                                               '=' | '>' | '>=' | '>>' | '[' | ']' | 'and' |
                                                               'ascending' | 'case' | 'cast' | 'castable' |
                                                               'collation' | 'count' | 'default' | 'descending' |
                                                               'div' | 'else' | 'empty' | 'end' | 'eq' | 'except' |
                                                               'for' | 'ge' | 'group' | 'gt' | 'idiv' | 'instance' |
                                                               'intersect' | 'is' | 'le' | 'let' | 'lt' | 'mod' | 'ne' |
                                                               'only' | 'or' | 'order' | 'return' | 'satisfies' |
                                                               'stable' | 'start' | 'to' | 'treat' | 'union' | 'where' |
                                                               '|' | '}' :)
      return $state
    else
      ($state[$p:l1], subsequence($state, $p:lk + 1))
  let $state :=
    if ($state[$p:lk] = 7795                                (: 'for' '$' :)
     or $state[$p:lk] = 7815                                (: 'let' '$' :)
     or $state[$p:lk] = 43379                               (: 'for' 'sliding' :)
     or $state[$p:lk] = 46451) then                         (: 'for' 'tumbling' :)
      let $state := p:parse-FLWORExpr($input, $state)
      return $state
    else if ($state[$p:lk] = 7790                           (: 'every' '$' :)
          or $state[$p:lk] = 7850) then                     (: 'some' '$' :)
      let $state := p:parse-QuantifiedExpr($input, $state)
      return $state
    else if ($state[$p:lk] = 8623) then                     (: 'switch' '(' :)
      let $state := p:parse-SwitchExpr($input, $state)
      return $state
    else if ($state[$p:lk] = 8631) then                     (: 'typeswitch' '(' :)
      let $state := p:parse-TypeswitchExpr($input, $state)
      return $state
    else if ($state[$p:lk] = 8571) then                     (: 'if' '(' :)
      let $state := p:parse-IfExpr($input, $state)
      return $state
    else if ($state[$p:lk] = 49844) then                    (: 'try' '{' :)
      let $state := p:parse-TryCatchExpr($input, $state)
      return $state
    else if ($state[$p:error]) then
      $state
    else
      let $state := p:parse-OrExpr($input, $state)
      return $state
  return p:reduce($state, "ExprSingle", $count)
};

(:~
 : Parse VarValue.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-VarValue($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:parse-ExprSingle($input, $state)
  return p:reduce($state, "VarValue", $count)
};

(:~
 : Parse ParenthesizedItemType.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-ParenthesizedItemType($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:shift(33, $input, $state)                 (: '(' :)
  let $state := p:lookahead1W(31, $input, $state)           (: EPSILON | S^WS | ('(' ':') :)
  let $state := p:parse-ItemType($input, $state)
  let $state := p:lookahead1W(41, $input, $state)           (: S^WS | ('(' ':') | ')' :)
  let $state := p:shift(36, $input, $state)                 (: ')' :)
  return p:reduce($state, "ParenthesizedItemType", $count)
};

(:~
 : Parse AtomicOrUnionType.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-AtomicOrUnionType($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:parse-EQName($input, $state)
  return p:reduce($state, "AtomicOrUnionType", $count)
};

(:~
 : Parse OccurrenceIndicator.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-OccurrenceIndicator($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state :=
    if ($state[$p:l1] = 63) then                            (: '?' :)
      let $state := p:shift(63, $input, $state)             (: '?' :)
      return $state
    else if ($state[$p:l1] = 38) then                       (: '*' :)
      let $state := p:shift(38, $input, $state)             (: '*' :)
      return $state
    else if ($state[$p:error]) then
      $state
    else
      let $state := p:shift(39, $input, $state)             (: '+' :)
      return $state
  return p:reduce($state, "OccurrenceIndicator", $count)
};

(:~
 : Parse SequenceType.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-SequenceType($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:lookahead1W(209, $input, $state)          (: EQName^Token | S^WS | '%' | '(' | ('(' ':') |
                                                               'ancestor' | 'ancestor-or-self' | 'and' | 'ascending' |
                                                               'attribute' | 'case' | 'cast' | 'castable' | 'child' |
                                                               'collation' | 'comment' | 'count' | 'declare' |
                                                               'default' | 'descendant' | 'descendant-or-self' |
                                                               'descending' | 'div' | 'document' | 'document-node' |
                                                               'element' | 'else' | 'empty' | 'empty-sequence' | 'end' |
                                                               'eq' | 'every' | 'except' | 'following' |
                                                               'following-sibling' | 'for' | 'function' | 'ge' |
                                                               'group' | 'gt' | 'idiv' | 'if' | 'import' | 'instance' |
                                                               'intersect' | 'is' | 'item' | 'le' | 'let' | 'lt' |
                                                               'mod' | 'module' | 'namespace' | 'namespace-node' |
                                                               'ne' | 'node' | 'only' | 'or' | 'order' | 'ordered' |
                                                               'parent' | 'preceding' | 'preceding-sibling' |
                                                               'processing-instruction' | 'return' | 'satisfies' |
                                                               'schema-attribute' | 'schema-element' | 'self' | 'some' |
                                                               'stable' | 'start' | 'switch' | 'text' | 'to' | 'treat' |
                                                               'try' | 'typeswitch' | 'union' | 'unordered' |
                                                               'validate' | 'where' | 'xquery' :)
  let $state :=
    if ($state[$p:l1] = 106) then                           (: 'empty-sequence' :)
      let $state := p:lookahead2W(198, $input, $state)      (: EOF | S^WS | '!=' | '(' | ('(' ':') | ')' | '*' | '*' |
                                                               '+' | ',' | '-' | ':=' | ';' | '<' | '<<' | '<=' | '=' |
                                                               '>' | '>=' | '>>' | '?' | ']' | 'allowing' | 'and' |
                                                               'ascending' | 'at' | 'case' | 'collation' | 'count' |
                                                               'default' | 'descending' | 'div' | 'else' | 'empty' |
                                                               'end' | 'eq' | 'except' | 'external' | 'for' | 'ge' |
                                                               'group' | 'gt' | 'idiv' | 'in' | 'instance' |
                                                               'intersect' | 'is' | 'le' | 'let' | 'lt' | 'mod' | 'ne' |
                                                               'only' | 'or' | 'order' | 'return' | 'satisfies' |
                                                               'stable' | 'start' | 'to' | 'union' | 'where' | '{' |
                                                               '|' | '}' :)
      return $state
    else
      ($state[$p:l1], subsequence($state, $p:lk + 1))
  let $state :=
    if ($state[$p:lk] = 8554) then                          (: 'empty-sequence' '(' :)
      let $state := p:shift(106, $input, $state)            (: 'empty-sequence' :)
      let $state := p:lookahead1W(40, $input, $state)       (: S^WS | '(' | ('(' ':') :)
      let $state := p:shift(33, $input, $state)             (: '(' :)
      let $state := p:lookahead1W(41, $input, $state)       (: S^WS | ('(' ':') | ')' :)
      let $state := p:shift(36, $input, $state)             (: ')' :)
      return $state
    else if ($state[$p:error]) then
      $state
    else
      let $state := p:parse-ItemType($input, $state)
      let $state := p:lookahead1W(194, $input, $state)      (: EOF | S^WS | '!=' | ('(' ':') | ')' | '*' | '*' | '+' |
                                                               ',' | '-' | ':=' | ';' | '<' | '<<' | '<=' | '=' | '>' |
                                                               '>=' | '>>' | '?' | ']' | 'allowing' | 'and' |
                                                               'ascending' | 'at' | 'case' | 'collation' | 'count' |
                                                               'default' | 'descending' | 'div' | 'else' | 'empty' |
                                                               'end' | 'eq' | 'except' | 'external' | 'for' | 'ge' |
                                                               'group' | 'gt' | 'idiv' | 'in' | 'instance' |
                                                               'intersect' | 'is' | 'le' | 'let' | 'lt' | 'mod' | 'ne' |
                                                               'only' | 'or' | 'order' | 'return' | 'satisfies' |
                                                               'stable' | 'start' | 'to' | 'union' | 'where' | '{' |
                                                               '|' | '}' :)
      let $state :=
        if ($state[$p:l1] = 38                              (: '*' :)
         or $state[$p:l1] = 39                              (: '+' :)
         or $state[$p:l1] = 63) then                        (: '?' :)
          let $state := p:parse-OccurrenceIndicator($input, $state)
          return $state
        else if ($state[$p:error]) then
          $state
        else
          $state
      return $state
  return p:reduce($state, "SequenceType", $count)
};

(:~
 : Parse the 1st loop of production TypedFunctionTest (zero or more). Use
 : tail recursion for iteratively updating the parser state.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-TypedFunctionTest-1($input as xs:string, $state as item()+) as item()+
{
  if ($state[$p:error]) then
    $state
  else
    let $state := p:lookahead1W(91, $input, $state)         (: S^WS | ('(' ':') | ')' | ',' :)
    return
      if ($state[$p:l1] != 40) then                         (: ',' :)
        $state
      else
        let $state := p:shift(40, $input, $state)           (: ',' :)
        let $state := p:lookahead1W(31, $input, $state)     (: EPSILON | S^WS | ('(' ':') :)
        let $state := p:parse-SequenceType($input, $state)
        return p:parse-TypedFunctionTest-1($input, $state)
};

(:~
 : Parse TypedFunctionTest.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-TypedFunctionTest($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:shift(116, $input, $state)                (: 'function' :)
  let $state := p:lookahead1W(40, $input, $state)           (: S^WS | '(' | ('(' ':') :)
  let $state := p:shift(33, $input, $state)                 (: '(' :)
  let $state := p:lookahead1W(212, $input, $state)          (: EQName^Token | S^WS | '%' | '(' | ('(' ':') | ')' |
                                                               'ancestor' | 'ancestor-or-self' | 'and' | 'ascending' |
                                                               'attribute' | 'case' | 'cast' | 'castable' | 'child' |
                                                               'collation' | 'comment' | 'count' | 'declare' |
                                                               'default' | 'descendant' | 'descendant-or-self' |
                                                               'descending' | 'div' | 'document' | 'document-node' |
                                                               'element' | 'else' | 'empty' | 'empty-sequence' | 'end' |
                                                               'eq' | 'every' | 'except' | 'following' |
                                                               'following-sibling' | 'for' | 'function' | 'ge' |
                                                               'group' | 'gt' | 'idiv' | 'if' | 'import' | 'instance' |
                                                               'intersect' | 'is' | 'item' | 'le' | 'let' | 'lt' |
                                                               'mod' | 'module' | 'namespace' | 'namespace-node' |
                                                               'ne' | 'node' | 'only' | 'or' | 'order' | 'ordered' |
                                                               'parent' | 'preceding' | 'preceding-sibling' |
                                                               'processing-instruction' | 'return' | 'satisfies' |
                                                               'schema-attribute' | 'schema-element' | 'self' | 'some' |
                                                               'stable' | 'start' | 'switch' | 'text' | 'to' | 'treat' |
                                                               'try' | 'typeswitch' | 'union' | 'unordered' |
                                                               'validate' | 'where' | 'xquery' :)
  let $state :=
    if ($state[$p:error]) then
      $state
    else if ($state[$p:l1] != 36) then                      (: ')' :)
      let $state := p:parse-SequenceType($input, $state)
      let $state := p:parse-TypedFunctionTest-1($input, $state)
      return $state
    else
      $state
  let $state := p:lookahead1W(41, $input, $state)           (: S^WS | ('(' ':') | ')' :)
  let $state := p:shift(36, $input, $state)                 (: ')' :)
  let $state := p:lookahead1W(49, $input, $state)           (: S^WS | ('(' ':') | 'as' :)
  let $state := p:shift(74, $input, $state)                 (: 'as' :)
  let $state := p:lookahead1W(31, $input, $state)           (: EPSILON | S^WS | ('(' ':') :)
  let $state := p:parse-SequenceType($input, $state)
  return p:reduce($state, "TypedFunctionTest", $count)
};

(:~
 : Parse AnyFunctionTest.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-AnyFunctionTest($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:shift(116, $input, $state)                (: 'function' :)
  let $state := p:lookahead1W(40, $input, $state)           (: S^WS | '(' | ('(' ':') :)
  let $state := p:shift(33, $input, $state)                 (: '(' :)
  let $state := p:lookahead1W(42, $input, $state)           (: S^WS | ('(' ':') | '*' :)
  let $state := p:shift(37, $input, $state)                 (: '*' :)
  let $state := p:lookahead1W(41, $input, $state)           (: S^WS | ('(' ':') | ')' :)
  let $state := p:shift(36, $input, $state)                 (: ')' :)
  return p:reduce($state, "AnyFunctionTest", $count)
};

(:~
 : Parse NumericLiteral.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-NumericLiteral($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state :=
    if ($state[$p:l1] = 9) then                             (: IntegerLiteral :)
      let $state := p:shift(9, $input, $state)              (: IntegerLiteral :)
      return $state
    else if ($state[$p:l1] = 10) then                       (: DecimalLiteral :)
      let $state := p:shift(10, $input, $state)             (: DecimalLiteral :)
      return $state
    else if ($state[$p:error]) then
      $state
    else
      let $state := p:shift(11, $input, $state)             (: DoubleLiteral :)
      return $state
  return p:reduce($state, "NumericLiteral", $count)
};

(:~
 : Parse Literal.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-Literal($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:lookahead1(82, $input, $state)            (: IntegerLiteral | DecimalLiteral | DoubleLiteral |
                                                               StringLiteral :)
  let $state :=
    if ($state[$p:l1] = 12) then                            (: StringLiteral :)
      let $state := p:shift(12, $input, $state)             (: StringLiteral :)
      return $state
    else if ($state[$p:error]) then
      $state
    else
      let $state := p:parse-NumericLiteral($input, $state)
      return $state
  return p:reduce($state, "Literal", $count)
};

(:~
 : Parse the 1st loop of production Annotation (zero or more). Use
 : tail recursion for iteratively updating the parser state.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-Annotation-1($input as xs:string, $state as item()+) as item()+
{
  if ($state[$p:error]) then
    $state
  else
    let $state := p:lookahead1W(91, $input, $state)         (: S^WS | ('(' ':') | ')' | ',' :)
    return
      if ($state[$p:l1] != 40) then                         (: ',' :)
        $state
      else
        let $state := p:shift(40, $input, $state)           (: ',' :)
        let $state := p:lookahead1W(137, $input, $state)    (: IntegerLiteral | DecimalLiteral | DoubleLiteral |
                                                               StringLiteral | S^WS | ('(' ':') :)
        let $state := p:parse-Literal($input, $state)
        return p:parse-Annotation-1($input, $state)
};

(:~
 : Parse Annotation.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-Annotation($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:shift(31, $input, $state)                 (: '%' :)
  let $state := p:lookahead1W(205, $input, $state)          (: EQName^Token | S^WS | ('(' ':') | 'ancestor' |
                                                               'ancestor-or-self' | 'and' | 'ascending' | 'attribute' |
                                                               'case' | 'cast' | 'castable' | 'child' | 'collation' |
                                                               'comment' | 'count' | 'declare' | 'default' |
                                                               'descendant' | 'descendant-or-self' | 'descending' |
                                                               'div' | 'document' | 'document-node' | 'element' |
                                                               'else' | 'empty' | 'empty-sequence' | 'end' | 'eq' |
                                                               'every' | 'except' | 'following' | 'following-sibling' |
                                                               'for' | 'function' | 'ge' | 'group' | 'gt' | 'idiv' |
                                                               'if' | 'import' | 'instance' | 'intersect' | 'is' |
                                                               'item' | 'le' | 'let' | 'lt' | 'mod' | 'module' |
                                                               'namespace' | 'namespace-node' | 'ne' | 'node' | 'only' |
                                                               'or' | 'order' | 'ordered' | 'parent' | 'preceding' |
                                                               'preceding-sibling' | 'processing-instruction' |
                                                               'return' | 'satisfies' | 'schema-attribute' |
                                                               'schema-element' | 'self' | 'some' | 'stable' | 'start' |
                                                               'switch' | 'text' | 'to' | 'treat' | 'try' |
                                                               'typeswitch' | 'union' | 'unordered' | 'validate' |
                                                               'where' | 'xquery' :)
  let $state := p:parse-EQName($input, $state)
  let $state := p:lookahead1W(139, $input, $state)          (: S^WS | '%' | '(' | ('(' ':') | 'function' | 'variable' :)
  let $state :=
    if ($state[$p:error]) then
      $state
    else if ($state[$p:l1] = 33) then                       (: '(' :)
      let $state := p:shift(33, $input, $state)             (: '(' :)
      let $state := p:lookahead1W(137, $input, $state)      (: IntegerLiteral | DecimalLiteral | DoubleLiteral |
                                                               StringLiteral | S^WS | ('(' ':') :)
      let $state := p:parse-Literal($input, $state)
      let $state := p:parse-Annotation-1($input, $state)
      let $state := p:shift(36, $input, $state)             (: ')' :)
      return $state
    else
      $state
  return p:reduce($state, "Annotation", $count)
};

(:~
 : Parse the 1st loop of production FunctionTest (zero or more). Use
 : tail recursion for iteratively updating the parser state.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-FunctionTest-1($input as xs:string, $state as item()+) as item()+
{
  if ($state[$p:error]) then
    $state
  else
    let $state := p:lookahead1W(89, $input, $state)         (: S^WS | '%' | ('(' ':') | 'function' :)
    return
      if ($state[$p:l1] != 31) then                         (: '%' :)
        $state
      else
        let $state := p:parse-Annotation($input, $state)
        return p:parse-FunctionTest-1($input, $state)
};

(:~
 : Parse FunctionTest.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-FunctionTest($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:parse-FunctionTest-1($input, $state)
  let $state :=
    if ($state[$p:l1] = 116) then                           (: 'function' :)
      let $state := p:lookahead2W(40, $input, $state)       (: S^WS | '(' | ('(' ':') :)
      let $state :=
        if ($state[$p:lk] = 8564) then                      (: 'function' '(' :)
          let $state := p:lookahead3W(213, $input, $state)  (: EQName^Token | S^WS | '%' | '(' | ('(' ':') | ')' | '*' |
                                                               'ancestor' | 'ancestor-or-self' | 'and' | 'ascending' |
                                                               'attribute' | 'case' | 'cast' | 'castable' | 'child' |
                                                               'collation' | 'comment' | 'count' | 'declare' |
                                                               'default' | 'descendant' | 'descendant-or-self' |
                                                               'descending' | 'div' | 'document' | 'document-node' |
                                                               'element' | 'else' | 'empty' | 'empty-sequence' | 'end' |
                                                               'eq' | 'every' | 'except' | 'following' |
                                                               'following-sibling' | 'for' | 'function' | 'ge' |
                                                               'group' | 'gt' | 'idiv' | 'if' | 'import' | 'instance' |
                                                               'intersect' | 'is' | 'item' | 'le' | 'let' | 'lt' |
                                                               'mod' | 'module' | 'namespace' | 'namespace-node' |
                                                               'ne' | 'node' | 'only' | 'or' | 'order' | 'ordered' |
                                                               'parent' | 'preceding' | 'preceding-sibling' |
                                                               'processing-instruction' | 'return' | 'satisfies' |
                                                               'schema-attribute' | 'schema-element' | 'self' | 'some' |
                                                               'stable' | 'start' | 'switch' | 'text' | 'to' | 'treat' |
                                                               'try' | 'typeswitch' | 'union' | 'unordered' |
                                                               'validate' | 'where' | 'xquery' :)
          return $state
        else
          $state
      return $state
    else
      ($state[$p:l1], subsequence($state, $p:lk + 1))
  let $state :=
    if ($state[$p:lk] = 2433396) then                       (: 'function' '(' '*' :)
      let $state := p:parse-AnyFunctionTest($input, $state)
      return $state
    else if ($state[$p:error]) then
      $state
    else
      let $state := p:parse-TypedFunctionTest($input, $state)
      return $state
  return p:reduce($state, "FunctionTest", $count)
};

(:~
 : Parse AnyKindTest.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-AnyKindTest($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:shift(146, $input, $state)                (: 'node' :)
  let $state := p:lookahead1W(40, $input, $state)           (: S^WS | '(' | ('(' ':') :)
  let $state := p:shift(33, $input, $state)                 (: '(' :)
  let $state := p:lookahead1W(41, $input, $state)           (: S^WS | ('(' ':') | ')' :)
  let $state := p:shift(36, $input, $state)                 (: ')' :)
  return p:reduce($state, "AnyKindTest", $count)
};

(:~
 : Parse NamespaceNodeTest.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-NamespaceNodeTest($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:shift(141, $input, $state)                (: 'namespace-node' :)
  let $state := p:lookahead1W(40, $input, $state)           (: S^WS | '(' | ('(' ':') :)
  let $state := p:shift(33, $input, $state)                 (: '(' :)
  let $state := p:lookahead1W(41, $input, $state)           (: S^WS | ('(' ':') | ')' :)
  let $state := p:shift(36, $input, $state)                 (: ')' :)
  return p:reduce($state, "NamespaceNodeTest", $count)
};

(:~
 : Parse TextTest.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-TextTest($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:shift(176, $input, $state)                (: 'text' :)
  let $state := p:lookahead1W(40, $input, $state)           (: S^WS | '(' | ('(' ':') :)
  let $state := p:shift(33, $input, $state)                 (: '(' :)
  let $state := p:lookahead1W(41, $input, $state)           (: S^WS | ('(' ':') | ')' :)
  let $state := p:shift(36, $input, $state)                 (: ')' :)
  return p:reduce($state, "TextTest", $count)
};

(:~
 : Parse CommentTest.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-CommentTest($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:shift(87, $input, $state)                 (: 'comment' :)
  let $state := p:lookahead1W(40, $input, $state)           (: S^WS | '(' | ('(' ':') :)
  let $state := p:shift(33, $input, $state)                 (: '(' :)
  let $state := p:lookahead1W(41, $input, $state)           (: S^WS | ('(' ':') | ')' :)
  let $state := p:shift(36, $input, $state)                 (: ')' :)
  return p:reduce($state, "CommentTest", $count)
};

(:~
 : Parse PITest.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-PITest($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:shift(162, $input, $state)                (: 'processing-instruction' :)
  let $state := p:lookahead1W(40, $input, $state)           (: S^WS | '(' | ('(' ':') :)
  let $state := p:shift(33, $input, $state)                 (: '(' :)
  let $state := p:lookahead1W(171, $input, $state)          (: StringLiteral | NCName^Token | S^WS | ('(' ':') | ')' |
                                                               'and' | 'ascending' | 'case' | 'cast' | 'castable' |
                                                               'collation' | 'count' | 'default' | 'descending' |
                                                               'div' | 'else' | 'empty' | 'end' | 'eq' | 'except' |
                                                               'for' | 'ge' | 'group' | 'gt' | 'idiv' | 'instance' |
                                                               'intersect' | 'is' | 'le' | 'let' | 'lt' | 'mod' | 'ne' |
                                                               'only' | 'or' | 'order' | 'return' | 'satisfies' |
                                                               'stable' | 'start' | 'to' | 'treat' | 'union' | 'where' :)
  let $state :=
    if ($state[$p:error]) then
      $state
    else if ($state[$p:l1] != 36) then                      (: ')' :)
      let $state :=
        if ($state[$p:l1] = 12) then                        (: StringLiteral :)
          let $state := p:shift(12, $input, $state)         (: StringLiteral :)
          return $state
        else if ($state[$p:error]) then
          $state
        else
          let $state := p:parse-NCName($input, $state)
          return $state
      return $state
    else
      $state
  let $state := p:lookahead1W(41, $input, $state)           (: S^WS | ('(' ':') | ')' :)
  let $state := p:shift(36, $input, $state)                 (: ')' :)
  return p:reduce($state, "PITest", $count)
};

(:~
 : Parse AttributeDeclaration.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-AttributeDeclaration($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:parse-AttributeName($input, $state)
  return p:reduce($state, "AttributeDeclaration", $count)
};

(:~
 : Parse SchemaAttributeTest.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-SchemaAttributeTest($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:shift(166, $input, $state)                (: 'schema-attribute' :)
  let $state := p:lookahead1W(40, $input, $state)           (: S^WS | '(' | ('(' ':') :)
  let $state := p:shift(33, $input, $state)                 (: '(' :)
  let $state := p:lookahead1W(205, $input, $state)          (: EQName^Token | S^WS | ('(' ':') | 'ancestor' |
                                                               'ancestor-or-self' | 'and' | 'ascending' | 'attribute' |
                                                               'case' | 'cast' | 'castable' | 'child' | 'collation' |
                                                               'comment' | 'count' | 'declare' | 'default' |
                                                               'descendant' | 'descendant-or-self' | 'descending' |
                                                               'div' | 'document' | 'document-node' | 'element' |
                                                               'else' | 'empty' | 'empty-sequence' | 'end' | 'eq' |
                                                               'every' | 'except' | 'following' | 'following-sibling' |
                                                               'for' | 'function' | 'ge' | 'group' | 'gt' | 'idiv' |
                                                               'if' | 'import' | 'instance' | 'intersect' | 'is' |
                                                               'item' | 'le' | 'let' | 'lt' | 'mod' | 'module' |
                                                               'namespace' | 'namespace-node' | 'ne' | 'node' | 'only' |
                                                               'or' | 'order' | 'ordered' | 'parent' | 'preceding' |
                                                               'preceding-sibling' | 'processing-instruction' |
                                                               'return' | 'satisfies' | 'schema-attribute' |
                                                               'schema-element' | 'self' | 'some' | 'stable' | 'start' |
                                                               'switch' | 'text' | 'to' | 'treat' | 'try' |
                                                               'typeswitch' | 'union' | 'unordered' | 'validate' |
                                                               'where' | 'xquery' :)
  let $state := p:parse-AttributeDeclaration($input, $state)
  let $state := p:lookahead1W(41, $input, $state)           (: S^WS | ('(' ':') | ')' :)
  let $state := p:shift(36, $input, $state)                 (: ')' :)
  return p:reduce($state, "SchemaAttributeTest", $count)
};

(:~
 : Parse AttributeName.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-AttributeName($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:parse-EQName($input, $state)
  return p:reduce($state, "AttributeName", $count)
};

(:~
 : Parse AttribNameOrWildcard.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-AttribNameOrWildcard($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state :=
    if ($state[$p:l1] = 37) then                            (: '*' :)
      let $state := p:shift(37, $input, $state)             (: '*' :)
      return $state
    else if ($state[$p:error]) then
      $state
    else
      let $state := p:parse-AttributeName($input, $state)
      return $state
  return p:reduce($state, "AttribNameOrWildcard", $count)
};

(:~
 : Parse AttributeTest.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-AttributeTest($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:shift(77, $input, $state)                 (: 'attribute' :)
  let $state := p:lookahead1W(40, $input, $state)           (: S^WS | '(' | ('(' ':') :)
  let $state := p:shift(33, $input, $state)                 (: '(' :)
  let $state := p:lookahead1W(210, $input, $state)          (: EQName^Token | S^WS | ('(' ':') | ')' | '*' |
                                                               'ancestor' | 'ancestor-or-self' | 'and' | 'ascending' |
                                                               'attribute' | 'case' | 'cast' | 'castable' | 'child' |
                                                               'collation' | 'comment' | 'count' | 'declare' |
                                                               'default' | 'descendant' | 'descendant-or-self' |
                                                               'descending' | 'div' | 'document' | 'document-node' |
                                                               'element' | 'else' | 'empty' | 'empty-sequence' | 'end' |
                                                               'eq' | 'every' | 'except' | 'following' |
                                                               'following-sibling' | 'for' | 'function' | 'ge' |
                                                               'group' | 'gt' | 'idiv' | 'if' | 'import' | 'instance' |
                                                               'intersect' | 'is' | 'item' | 'le' | 'let' | 'lt' |
                                                               'mod' | 'module' | 'namespace' | 'namespace-node' |
                                                               'ne' | 'node' | 'only' | 'or' | 'order' | 'ordered' |
                                                               'parent' | 'preceding' | 'preceding-sibling' |
                                                               'processing-instruction' | 'return' | 'satisfies' |
                                                               'schema-attribute' | 'schema-element' | 'self' | 'some' |
                                                               'stable' | 'start' | 'switch' | 'text' | 'to' | 'treat' |
                                                               'try' | 'typeswitch' | 'union' | 'unordered' |
                                                               'validate' | 'where' | 'xquery' :)
  let $state :=
    if ($state[$p:error]) then
      $state
    else if ($state[$p:l1] != 36) then                      (: ')' :)
      let $state := p:parse-AttribNameOrWildcard($input, $state)
      let $state := p:lookahead1W(91, $input, $state)       (: S^WS | ('(' ':') | ')' | ',' :)
      let $state :=
        if ($state[$p:error]) then
          $state
        else if ($state[$p:l1] = 40) then                   (: ',' :)
          let $state := p:shift(40, $input, $state)         (: ',' :)
          let $state := p:lookahead1W(205, $input, $state)  (: EQName^Token | S^WS | ('(' ':') | 'ancestor' |
                                                               'ancestor-or-self' | 'and' | 'ascending' | 'attribute' |
                                                               'case' | 'cast' | 'castable' | 'child' | 'collation' |
                                                               'comment' | 'count' | 'declare' | 'default' |
                                                               'descendant' | 'descendant-or-self' | 'descending' |
                                                               'div' | 'document' | 'document-node' | 'element' |
                                                               'else' | 'empty' | 'empty-sequence' | 'end' | 'eq' |
                                                               'every' | 'except' | 'following' | 'following-sibling' |
                                                               'for' | 'function' | 'ge' | 'group' | 'gt' | 'idiv' |
                                                               'if' | 'import' | 'instance' | 'intersect' | 'is' |
                                                               'item' | 'le' | 'let' | 'lt' | 'mod' | 'module' |
                                                               'namespace' | 'namespace-node' | 'ne' | 'node' | 'only' |
                                                               'or' | 'order' | 'ordered' | 'parent' | 'preceding' |
                                                               'preceding-sibling' | 'processing-instruction' |
                                                               'return' | 'satisfies' | 'schema-attribute' |
                                                               'schema-element' | 'self' | 'some' | 'stable' | 'start' |
                                                               'switch' | 'text' | 'to' | 'treat' | 'try' |
                                                               'typeswitch' | 'union' | 'unordered' | 'validate' |
                                                               'where' | 'xquery' :)
          let $state := p:parse-TypeName($input, $state)
          return $state
        else
          $state
      return $state
    else
      $state
  let $state := p:lookahead1W(41, $input, $state)           (: S^WS | ('(' ':') | ')' :)
  let $state := p:shift(36, $input, $state)                 (: ')' :)
  return p:reduce($state, "AttributeTest", $count)
};

(:~
 : Parse ElementDeclaration.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-ElementDeclaration($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:parse-ElementName($input, $state)
  return p:reduce($state, "ElementDeclaration", $count)
};

(:~
 : Parse SchemaElementTest.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-SchemaElementTest($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:shift(167, $input, $state)                (: 'schema-element' :)
  let $state := p:lookahead1W(40, $input, $state)           (: S^WS | '(' | ('(' ':') :)
  let $state := p:shift(33, $input, $state)                 (: '(' :)
  let $state := p:lookahead1W(205, $input, $state)          (: EQName^Token | S^WS | ('(' ':') | 'ancestor' |
                                                               'ancestor-or-self' | 'and' | 'ascending' | 'attribute' |
                                                               'case' | 'cast' | 'castable' | 'child' | 'collation' |
                                                               'comment' | 'count' | 'declare' | 'default' |
                                                               'descendant' | 'descendant-or-self' | 'descending' |
                                                               'div' | 'document' | 'document-node' | 'element' |
                                                               'else' | 'empty' | 'empty-sequence' | 'end' | 'eq' |
                                                               'every' | 'except' | 'following' | 'following-sibling' |
                                                               'for' | 'function' | 'ge' | 'group' | 'gt' | 'idiv' |
                                                               'if' | 'import' | 'instance' | 'intersect' | 'is' |
                                                               'item' | 'le' | 'let' | 'lt' | 'mod' | 'module' |
                                                               'namespace' | 'namespace-node' | 'ne' | 'node' | 'only' |
                                                               'or' | 'order' | 'ordered' | 'parent' | 'preceding' |
                                                               'preceding-sibling' | 'processing-instruction' |
                                                               'return' | 'satisfies' | 'schema-attribute' |
                                                               'schema-element' | 'self' | 'some' | 'stable' | 'start' |
                                                               'switch' | 'text' | 'to' | 'treat' | 'try' |
                                                               'typeswitch' | 'union' | 'unordered' | 'validate' |
                                                               'where' | 'xquery' :)
  let $state := p:parse-ElementDeclaration($input, $state)
  let $state := p:lookahead1W(41, $input, $state)           (: S^WS | ('(' ':') | ')' :)
  let $state := p:shift(36, $input, $state)                 (: ')' :)
  return p:reduce($state, "SchemaElementTest", $count)
};

(:~
 : Parse TypeName.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-TypeName($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:parse-EQName($input, $state)
  return p:reduce($state, "TypeName", $count)
};

(:~
 : Parse ElementName.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-ElementName($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:parse-EQName($input, $state)
  return p:reduce($state, "ElementName", $count)
};

(:~
 : Parse ElementNameOrWildcard.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-ElementNameOrWildcard($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state :=
    if ($state[$p:l1] = 37) then                            (: '*' :)
      let $state := p:shift(37, $input, $state)             (: '*' :)
      return $state
    else if ($state[$p:error]) then
      $state
    else
      let $state := p:parse-ElementName($input, $state)
      return $state
  return p:reduce($state, "ElementNameOrWildcard", $count)
};

(:~
 : Parse ElementTest.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-ElementTest($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:shift(103, $input, $state)                (: 'element' :)
  let $state := p:lookahead1W(40, $input, $state)           (: S^WS | '(' | ('(' ':') :)
  let $state := p:shift(33, $input, $state)                 (: '(' :)
  let $state := p:lookahead1W(210, $input, $state)          (: EQName^Token | S^WS | ('(' ':') | ')' | '*' |
                                                               'ancestor' | 'ancestor-or-self' | 'and' | 'ascending' |
                                                               'attribute' | 'case' | 'cast' | 'castable' | 'child' |
                                                               'collation' | 'comment' | 'count' | 'declare' |
                                                               'default' | 'descendant' | 'descendant-or-self' |
                                                               'descending' | 'div' | 'document' | 'document-node' |
                                                               'element' | 'else' | 'empty' | 'empty-sequence' | 'end' |
                                                               'eq' | 'every' | 'except' | 'following' |
                                                               'following-sibling' | 'for' | 'function' | 'ge' |
                                                               'group' | 'gt' | 'idiv' | 'if' | 'import' | 'instance' |
                                                               'intersect' | 'is' | 'item' | 'le' | 'let' | 'lt' |
                                                               'mod' | 'module' | 'namespace' | 'namespace-node' |
                                                               'ne' | 'node' | 'only' | 'or' | 'order' | 'ordered' |
                                                               'parent' | 'preceding' | 'preceding-sibling' |
                                                               'processing-instruction' | 'return' | 'satisfies' |
                                                               'schema-attribute' | 'schema-element' | 'self' | 'some' |
                                                               'stable' | 'start' | 'switch' | 'text' | 'to' | 'treat' |
                                                               'try' | 'typeswitch' | 'union' | 'unordered' |
                                                               'validate' | 'where' | 'xquery' :)
  let $state :=
    if ($state[$p:error]) then
      $state
    else if ($state[$p:l1] != 36) then                      (: ')' :)
      let $state := p:parse-ElementNameOrWildcard($input, $state)
      let $state := p:lookahead1W(91, $input, $state)       (: S^WS | ('(' ':') | ')' | ',' :)
      let $state :=
        if ($state[$p:error]) then
          $state
        else if ($state[$p:l1] = 40) then                   (: ',' :)
          let $state := p:shift(40, $input, $state)         (: ',' :)
          let $state := p:lookahead1W(205, $input, $state)  (: EQName^Token | S^WS | ('(' ':') | 'ancestor' |
                                                               'ancestor-or-self' | 'and' | 'ascending' | 'attribute' |
                                                               'case' | 'cast' | 'castable' | 'child' | 'collation' |
                                                               'comment' | 'count' | 'declare' | 'default' |
                                                               'descendant' | 'descendant-or-self' | 'descending' |
                                                               'div' | 'document' | 'document-node' | 'element' |
                                                               'else' | 'empty' | 'empty-sequence' | 'end' | 'eq' |
                                                               'every' | 'except' | 'following' | 'following-sibling' |
                                                               'for' | 'function' | 'ge' | 'group' | 'gt' | 'idiv' |
                                                               'if' | 'import' | 'instance' | 'intersect' | 'is' |
                                                               'item' | 'le' | 'let' | 'lt' | 'mod' | 'module' |
                                                               'namespace' | 'namespace-node' | 'ne' | 'node' | 'only' |
                                                               'or' | 'order' | 'ordered' | 'parent' | 'preceding' |
                                                               'preceding-sibling' | 'processing-instruction' |
                                                               'return' | 'satisfies' | 'schema-attribute' |
                                                               'schema-element' | 'self' | 'some' | 'stable' | 'start' |
                                                               'switch' | 'text' | 'to' | 'treat' | 'try' |
                                                               'typeswitch' | 'union' | 'unordered' | 'validate' |
                                                               'where' | 'xquery' :)
          let $state := p:parse-TypeName($input, $state)
          let $state := p:lookahead1W(92, $input, $state)   (: S^WS | ('(' ':') | ')' | '?' :)
          let $state :=
            if ($state[$p:error]) then
              $state
            else if ($state[$p:l1] = 63) then               (: '?' :)
              let $state := p:shift(63, $input, $state)     (: '?' :)
              return $state
            else
              $state
          return $state
        else
          $state
      return $state
    else
      $state
  let $state := p:lookahead1W(41, $input, $state)           (: S^WS | ('(' ':') | ')' :)
  let $state := p:shift(36, $input, $state)                 (: ')' :)
  return p:reduce($state, "ElementTest", $count)
};

(:~
 : Parse DocumentTest.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-DocumentTest($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:shift(102, $input, $state)                (: 'document-node' :)
  let $state := p:lookahead1W(40, $input, $state)           (: S^WS | '(' | ('(' ':') :)
  let $state := p:shift(33, $input, $state)                 (: '(' :)
  let $state := p:lookahead1W(130, $input, $state)          (: S^WS | ('(' ':') | ')' | 'element' | 'schema-element' :)
  let $state :=
    if ($state[$p:error]) then
      $state
    else if ($state[$p:l1] != 36) then                      (: ')' :)
      let $state :=
        if ($state[$p:l1] = 103) then                       (: 'element' :)
          let $state := p:parse-ElementTest($input, $state)
          return $state
        else if ($state[$p:error]) then
          $state
        else
          let $state := p:parse-SchemaElementTest($input, $state)
          return $state
      return $state
    else
      $state
  let $state := p:lookahead1W(41, $input, $state)           (: S^WS | ('(' ':') | ')' :)
  let $state := p:shift(36, $input, $state)                 (: ')' :)
  return p:reduce($state, "DocumentTest", $count)
};

(:~
 : Parse KindTest.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-KindTest($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state :=
    if ($state[$p:l1] = 102) then                           (: 'document-node' :)
      let $state := p:parse-DocumentTest($input, $state)
      return $state
    else if ($state[$p:l1] = 103) then                      (: 'element' :)
      let $state := p:parse-ElementTest($input, $state)
      return $state
    else if ($state[$p:l1] = 77) then                       (: 'attribute' :)
      let $state := p:parse-AttributeTest($input, $state)
      return $state
    else if ($state[$p:l1] = 167) then                      (: 'schema-element' :)
      let $state := p:parse-SchemaElementTest($input, $state)
      return $state
    else if ($state[$p:l1] = 166) then                      (: 'schema-attribute' :)
      let $state := p:parse-SchemaAttributeTest($input, $state)
      return $state
    else if ($state[$p:l1] = 162) then                      (: 'processing-instruction' :)
      let $state := p:parse-PITest($input, $state)
      return $state
    else if ($state[$p:l1] = 87) then                       (: 'comment' :)
      let $state := p:parse-CommentTest($input, $state)
      return $state
    else if ($state[$p:l1] = 176) then                      (: 'text' :)
      let $state := p:parse-TextTest($input, $state)
      return $state
    else if ($state[$p:l1] = 141) then                      (: 'namespace-node' :)
      let $state := p:parse-NamespaceNodeTest($input, $state)
      return $state
    else if ($state[$p:error]) then
      $state
    else
      let $state := p:parse-AnyKindTest($input, $state)
      return $state
  return p:reduce($state, "KindTest", $count)
};

(:~
 : Parse ItemType.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-ItemType($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:lookahead1W(209, $input, $state)          (: EQName^Token | S^WS | '%' | '(' | ('(' ':') |
                                                               'ancestor' | 'ancestor-or-self' | 'and' | 'ascending' |
                                                               'attribute' | 'case' | 'cast' | 'castable' | 'child' |
                                                               'collation' | 'comment' | 'count' | 'declare' |
                                                               'default' | 'descendant' | 'descendant-or-self' |
                                                               'descending' | 'div' | 'document' | 'document-node' |
                                                               'element' | 'else' | 'empty' | 'empty-sequence' | 'end' |
                                                               'eq' | 'every' | 'except' | 'following' |
                                                               'following-sibling' | 'for' | 'function' | 'ge' |
                                                               'group' | 'gt' | 'idiv' | 'if' | 'import' | 'instance' |
                                                               'intersect' | 'is' | 'item' | 'le' | 'let' | 'lt' |
                                                               'mod' | 'module' | 'namespace' | 'namespace-node' |
                                                               'ne' | 'node' | 'only' | 'or' | 'order' | 'ordered' |
                                                               'parent' | 'preceding' | 'preceding-sibling' |
                                                               'processing-instruction' | 'return' | 'satisfies' |
                                                               'schema-attribute' | 'schema-element' | 'self' | 'some' |
                                                               'stable' | 'start' | 'switch' | 'text' | 'to' | 'treat' |
                                                               'try' | 'typeswitch' | 'union' | 'unordered' |
                                                               'validate' | 'where' | 'xquery' :)
  let $state :=
    if ($state[$p:l1] = 77                                  (: 'comment' :)
     or $state[$p:l1] = 87                                  (: 'document-node' :)
     or $state[$p:l1] = 102                                 (: 'element' :)
     or $state[$p:l1] = 103                                 (: 'function' :)
     or $state[$p:l1] = 116                                 (: 'item' :)
     or $state[$p:l1] = 131                                 (: 'namespace-node' :)
     or $state[$p:l1] = 141                                 (: 'node' :)
     or $state[$p:l1] = 146                                 (: 'processing-instruction' :)
     or $state[$p:l1] = 162                                 (: 'schema-attribute' :)
     or $state[$p:l1] = 166                                 (: 'schema-element' :)
     or $state[$p:l1] = 167                                 (: 'text' :)
     or $state[$p:l1] = 176) then                           (: 'text' :)
      let $state := p:lookahead2W(198, $input, $state)      (: EOF | S^WS | '!=' | '(' | ('(' ':') | ')' | '*' | '*' |
                                                               '+' | ',' | '-' | ':=' | ';' | '<' | '<<' | '<=' | '=' |
                                                               '>' | '>=' | '>>' | '?' | ']' | 'allowing' | 'and' |
                                                               'ascending' | 'at' | 'case' | 'collation' | 'count' |
                                                               'default' | 'descending' | 'div' | 'else' | 'empty' |
                                                               'end' | 'eq' | 'except' | 'external' | 'for' | 'ge' |
                                                               'group' | 'gt' | 'idiv' | 'in' | 'instance' |
                                                               'intersect' | 'is' | 'le' | 'let' | 'lt' | 'mod' | 'ne' |
                                                               'only' | 'or' | 'order' | 'return' | 'satisfies' |
                                                               'stable' | 'start' | 'to' | 'union' | 'where' | '{' |
                                                               '|' | '}' :)
      return $state
    else
      ($state[$p:l1], subsequence($state, $p:lk + 1))
  let $state :=
    if ($state[$p:lk] = 8525                                (: 'attribute' '(' :)
     or $state[$p:lk] = 8535                                (: 'comment' '(' :)
     or $state[$p:lk] = 8550                                (: 'document-node' '(' :)
     or $state[$p:lk] = 8551                                (: 'element' '(' :)
     or $state[$p:lk] = 8589                                (: 'namespace-node' '(' :)
     or $state[$p:lk] = 8594                                (: 'node' '(' :)
     or $state[$p:lk] = 8610                                (: 'processing-instruction' '(' :)
     or $state[$p:lk] = 8614                                (: 'schema-attribute' '(' :)
     or $state[$p:lk] = 8615                                (: 'schema-element' '(' :)
     or $state[$p:lk] = 8624) then                          (: 'text' '(' :)
      let $state := p:parse-KindTest($input, $state)
      return $state
    else if ($state[$p:lk] = 8579) then                     (: 'item' '(' :)
      let $state := p:shift(131, $input, $state)            (: 'item' :)
      let $state := p:lookahead1W(40, $input, $state)       (: S^WS | '(' | ('(' ':') :)
      let $state := p:shift(33, $input, $state)             (: '(' :)
      let $state := p:lookahead1W(41, $input, $state)       (: S^WS | ('(' ':') | ')' :)
      let $state := p:shift(36, $input, $state)             (: ')' :)
      return $state
    else if ($state[$p:lk] = 31                             (: '%' :)
          or $state[$p:lk] = 8564) then                     (: 'function' '(' :)
      let $state := p:parse-FunctionTest($input, $state)
      return $state
    else if ($state[$p:lk] = 33) then                       (: '(' :)
      let $state := p:parse-ParenthesizedItemType($input, $state)
      return $state
    else if ($state[$p:error]) then
      $state
    else
      let $state := p:parse-AtomicOrUnionType($input, $state)
      return $state
  return p:reduce($state, "ItemType", $count)
};

(:~
 : Parse ContextItemDecl.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-ContextItemDecl($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:shift(94, $input, $state)                 (: 'declare' :)
  let $state := p:lookahead1W(56, $input, $state)           (: S^WS | ('(' ':') | 'context' :)
  let $state := p:shift(89, $input, $state)                 (: 'context' :)
  let $state := p:lookahead1W(65, $input, $state)           (: S^WS | ('(' ':') | 'item' :)
  let $state := p:shift(131, $input, $state)                (: 'item' :)
  let $state := p:lookahead1W(131, $input, $state)          (: S^WS | ('(' ':') | ':=' | 'as' | 'external' :)
  let $state :=
    if ($state[$p:error]) then
      $state
    else if ($state[$p:l1] = 74) then                       (: 'as' :)
      let $state := p:shift(74, $input, $state)             (: 'as' :)
      let $state := p:lookahead1W(31, $input, $state)       (: EPSILON | S^WS | ('(' ':') :)
      let $state := p:parse-ItemType($input, $state)
      return $state
    else
      $state
  let $state := p:lookahead1W(97, $input, $state)           (: S^WS | ('(' ':') | ':=' | 'external' :)
  let $state :=
    if ($state[$p:l1] = 50) then                            (: ':=' :)
      let $state := p:shift(50, $input, $state)             (: ':=' :)
      let $state := p:lookahead1W(31, $input, $state)       (: EPSILON | S^WS | ('(' ':') :)
      let $state := p:parse-VarValue($input, $state)
      return $state
    else if ($state[$p:error]) then
      $state
    else
      let $state := p:shift(112, $input, $state)            (: 'external' :)
      let $state := p:lookahead1W(95, $input, $state)       (: S^WS | ('(' ':') | ':=' | ';' :)
      let $state :=
        if ($state[$p:error]) then
          $state
        else if ($state[$p:l1] = 50) then                   (: ':=' :)
          let $state := p:shift(50, $input, $state)         (: ':=' :)
          let $state := p:lookahead1W(31, $input, $state)   (: EPSILON | S^WS | ('(' ':') :)
          let $state := p:parse-VarDefaultValue($input, $state)
          return $state
        else
          $state
      return $state
  return p:reduce($state, "ContextItemDecl", $count)
};

(:~
 : Parse the 1st loop of production ModuleImport (zero or more). Use
 : tail recursion for iteratively updating the parser state.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-ModuleImport-1($input as xs:string, $state as item()+) as item()+
{
  if ($state[$p:error]) then
    $state
  else
    let $state := p:lookahead1W(93, $input, $state)         (: S^WS | ('(' ':') | ',' | ';' :)
    return
      if ($state[$p:l1] != 40) then                         (: ',' :)
        $state
      else
        let $state := p:shift(40, $input, $state)           (: ',' :)
        let $state := p:lookahead1W(33, $input, $state)     (: URILiteral | S^WS | ('(' ':') :)
        let $state := p:shift(8, $input, $state)            (: URILiteral :)
        return p:parse-ModuleImport-1($input, $state)
};

(:~
 : Parse ModuleImport.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-ModuleImport($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:shift(124, $input, $state)                (: 'import' :)
  let $state := p:lookahead1W(66, $input, $state)           (: S^WS | ('(' ':') | 'module' :)
  let $state := p:shift(139, $input, $state)                (: 'module' :)
  let $state := p:lookahead1W(80, $input, $state)           (: URILiteral | S^WS | ('(' ':') | 'namespace' :)
  let $state :=
    if ($state[$p:error]) then
      $state
    else if ($state[$p:l1] = 140) then                      (: 'namespace' :)
      let $state := p:shift(140, $input, $state)            (: 'namespace' :)
      let $state := p:lookahead1W(166, $input, $state)      (: NCName^Token | S^WS | ('(' ':') | 'and' | 'ascending' |
                                                               'case' | 'cast' | 'castable' | 'collation' | 'count' |
                                                               'default' | 'descending' | 'div' | 'else' | 'empty' |
                                                               'end' | 'eq' | 'except' | 'for' | 'ge' | 'group' | 'gt' |
                                                               'idiv' | 'instance' | 'intersect' | 'is' | 'le' | 'let' |
                                                               'lt' | 'mod' | 'ne' | 'only' | 'or' | 'order' |
                                                               'return' | 'satisfies' | 'stable' | 'start' | 'to' |
                                                               'treat' | 'union' | 'where' :)
      let $state := p:parse-NCName($input, $state)
      let $state := p:lookahead1W(47, $input, $state)       (: S^WS | ('(' ':') | '=' :)
      let $state := p:shift(59, $input, $state)             (: '=' :)
      return $state
    else
      $state
  let $state := p:lookahead1W(33, $input, $state)           (: URILiteral | S^WS | ('(' ':') :)
  let $state := p:shift(8, $input, $state)                  (: URILiteral :)
  let $state := p:lookahead1W(98, $input, $state)           (: S^WS | ('(' ':') | ';' | 'at' :)
  let $state :=
    if ($state[$p:error]) then
      $state
    else if ($state[$p:l1] = 76) then                       (: 'at' :)
      let $state := p:shift(76, $input, $state)             (: 'at' :)
      let $state := p:lookahead1W(33, $input, $state)       (: URILiteral | S^WS | ('(' ':') :)
      let $state := p:shift(8, $input, $state)              (: URILiteral :)
      let $state := p:parse-ModuleImport-1($input, $state)
      return $state
    else
      $state
  return p:reduce($state, "ModuleImport", $count)
};

(:~
 : Parse SchemaPrefix.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-SchemaPrefix($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state :=
    if ($state[$p:l1] = 140) then                           (: 'namespace' :)
      let $state := p:shift(140, $input, $state)            (: 'namespace' :)
      let $state := p:lookahead1W(166, $input, $state)      (: NCName^Token | S^WS | ('(' ':') | 'and' | 'ascending' |
                                                               'case' | 'cast' | 'castable' | 'collation' | 'count' |
                                                               'default' | 'descending' | 'div' | 'else' | 'empty' |
                                                               'end' | 'eq' | 'except' | 'for' | 'ge' | 'group' | 'gt' |
                                                               'idiv' | 'instance' | 'intersect' | 'is' | 'le' | 'let' |
                                                               'lt' | 'mod' | 'ne' | 'only' | 'or' | 'order' |
                                                               'return' | 'satisfies' | 'stable' | 'start' | 'to' |
                                                               'treat' | 'union' | 'where' :)
      let $state := p:parse-NCName($input, $state)
      let $state := p:lookahead1W(47, $input, $state)       (: S^WS | ('(' ':') | '=' :)
      let $state := p:shift(59, $input, $state)             (: '=' :)
      return $state
    else if ($state[$p:error]) then
      $state
    else
      let $state := p:shift(95, $input, $state)             (: 'default' :)
      let $state := p:lookahead1W(60, $input, $state)       (: S^WS | ('(' ':') | 'element' :)
      let $state := p:shift(103, $input, $state)            (: 'element' :)
      let $state := p:lookahead1W(67, $input, $state)       (: S^WS | ('(' ':') | 'namespace' :)
      let $state := p:shift(140, $input, $state)            (: 'namespace' :)
      return $state
  return p:reduce($state, "SchemaPrefix", $count)
};

(:~
 : Parse the 1st loop of production SchemaImport (zero or more). Use
 : tail recursion for iteratively updating the parser state.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-SchemaImport-1($input as xs:string, $state as item()+) as item()+
{
  if ($state[$p:error]) then
    $state
  else
    let $state := p:lookahead1W(93, $input, $state)         (: S^WS | ('(' ':') | ',' | ';' :)
    return
      if ($state[$p:l1] != 40) then                         (: ',' :)
        $state
      else
        let $state := p:shift(40, $input, $state)           (: ',' :)
        let $state := p:lookahead1W(33, $input, $state)     (: URILiteral | S^WS | ('(' ':') :)
        let $state := p:shift(8, $input, $state)            (: URILiteral :)
        return p:parse-SchemaImport-1($input, $state)
};

(:~
 : Parse SchemaImport.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-SchemaImport($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:shift(124, $input, $state)                (: 'import' :)
  let $state := p:lookahead1W(73, $input, $state)           (: S^WS | ('(' ':') | 'schema' :)
  let $state := p:shift(165, $input, $state)                (: 'schema' :)
  let $state := p:lookahead1W(124, $input, $state)          (: URILiteral | S^WS | ('(' ':') | 'default' | 'namespace' :)
  let $state :=
    if ($state[$p:error]) then
      $state
    else if ($state[$p:l1] != 8) then                       (: URILiteral :)
      let $state := p:parse-SchemaPrefix($input, $state)
      return $state
    else
      $state
  let $state := p:lookahead1W(33, $input, $state)           (: URILiteral | S^WS | ('(' ':') :)
  let $state := p:shift(8, $input, $state)                  (: URILiteral :)
  let $state := p:lookahead1W(98, $input, $state)           (: S^WS | ('(' ':') | ';' | 'at' :)
  let $state :=
    if ($state[$p:error]) then
      $state
    else if ($state[$p:l1] = 76) then                       (: 'at' :)
      let $state := p:shift(76, $input, $state)             (: 'at' :)
      let $state := p:lookahead1W(33, $input, $state)       (: URILiteral | S^WS | ('(' ':') :)
      let $state := p:shift(8, $input, $state)              (: URILiteral :)
      let $state := p:parse-SchemaImport-1($input, $state)
      return $state
    else
      $state
  return p:reduce($state, "SchemaImport", $count)
};

(:~
 : Parse Import.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-Import($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state :=
    if ($state[$p:l1] = 124) then                           (: 'import' :)
      let $state := p:lookahead2W(114, $input, $state)      (: S^WS | ('(' ':') | 'module' | 'schema' :)
      return $state
    else
      ($state[$p:l1], subsequence($state, $p:lk + 1))
  let $state :=
    if ($state[$p:lk] = 42364) then                         (: 'import' 'schema' :)
      let $state := p:parse-SchemaImport($input, $state)
      return $state
    else if ($state[$p:error]) then
      $state
    else
      let $state := p:parse-ModuleImport($input, $state)
      return $state
  return p:reduce($state, "Import", $count)
};

(:~
 : Parse NamespaceDecl.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-NamespaceDecl($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:shift(94, $input, $state)                 (: 'declare' :)
  let $state := p:lookahead1W(67, $input, $state)           (: S^WS | ('(' ':') | 'namespace' :)
  let $state := p:shift(140, $input, $state)                (: 'namespace' :)
  let $state := p:lookahead1W(166, $input, $state)          (: NCName^Token | S^WS | ('(' ':') | 'and' | 'ascending' |
                                                               'case' | 'cast' | 'castable' | 'collation' | 'count' |
                                                               'default' | 'descending' | 'div' | 'else' | 'empty' |
                                                               'end' | 'eq' | 'except' | 'for' | 'ge' | 'group' | 'gt' |
                                                               'idiv' | 'instance' | 'intersect' | 'is' | 'le' | 'let' |
                                                               'lt' | 'mod' | 'ne' | 'only' | 'or' | 'order' |
                                                               'return' | 'satisfies' | 'stable' | 'start' | 'to' |
                                                               'treat' | 'union' | 'where' :)
  let $state := p:parse-NCName($input, $state)
  let $state := p:lookahead1W(47, $input, $state)           (: S^WS | ('(' ':') | '=' :)
  let $state := p:shift(59, $input, $state)                 (: '=' :)
  let $state := p:lookahead1W(33, $input, $state)           (: URILiteral | S^WS | ('(' ':') :)
  let $state := p:shift(8, $input, $state)                  (: URILiteral :)
  return p:reduce($state, "NamespaceDecl", $count)
};

(:~
 : Parse DFPropertyName.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-DFPropertyName($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state :=
    if ($state[$p:l1] = 93) then                            (: 'decimal-separator' :)
      let $state := p:shift(93, $input, $state)             (: 'decimal-separator' :)
      return $state
    else if ($state[$p:l1] = 120) then                      (: 'grouping-separator' :)
      let $state := p:shift(120, $input, $state)            (: 'grouping-separator' :)
      return $state
    else if ($state[$p:l1] = 126) then                      (: 'infinity' :)
      let $state := p:shift(126, $input, $state)            (: 'infinity' :)
      return $state
    else if ($state[$p:l1] = 137) then                      (: 'minus-sign' :)
      let $state := p:shift(137, $input, $state)            (: 'minus-sign' :)
      return $state
    else if ($state[$p:l1] = 66) then                       (: 'NaN' :)
      let $state := p:shift(66, $input, $state)             (: 'NaN' :)
      return $state
    else if ($state[$p:l1] = 157) then                      (: 'percent' :)
      let $state := p:shift(157, $input, $state)            (: 'percent' :)
      return $state
    else if ($state[$p:l1] = 156) then                      (: 'per-mille' :)
      let $state := p:shift(156, $input, $state)            (: 'per-mille' :)
      return $state
    else if ($state[$p:l1] = 193) then                      (: 'zero-digit' :)
      let $state := p:shift(193, $input, $state)            (: 'zero-digit' :)
      return $state
    else if ($state[$p:l1] = 99) then                       (: 'digit' :)
      let $state := p:shift(99, $input, $state)             (: 'digit' :)
      return $state
    else if ($state[$p:error]) then
      $state
    else
      let $state := p:shift(155, $input, $state)            (: 'pattern-separator' :)
      return $state
  return p:reduce($state, "DFPropertyName", $count)
};

(:~
 : Parse FunctionName.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-FunctionName($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:lookahead1(191, $input, $state)           (: EQName^Token | 'ancestor' | 'ancestor-or-self' | 'and' |
                                                               'ascending' | 'case' | 'cast' | 'castable' | 'child' |
                                                               'collation' | 'count' | 'declare' | 'default' |
                                                               'descendant' | 'descendant-or-self' | 'descending' |
                                                               'div' | 'document' | 'else' | 'empty' | 'end' | 'eq' |
                                                               'every' | 'except' | 'following' | 'following-sibling' |
                                                               'for' | 'ge' | 'group' | 'gt' | 'idiv' | 'import' |
                                                               'instance' | 'intersect' | 'is' | 'le' | 'let' | 'lt' |
                                                               'mod' | 'module' | 'namespace' | 'ne' | 'only' | 'or' |
                                                               'order' | 'ordered' | 'parent' | 'preceding' |
                                                               'preceding-sibling' | 'return' | 'satisfies' | 'self' |
                                                               'some' | 'stable' | 'start' | 'to' | 'treat' | 'try' |
                                                               'union' | 'unordered' | 'validate' | 'where' | 'xquery' :)
  let $state :=
    if ($state[$p:l1] = 7) then                             (: EQName^Token :)
      let $state := p:shift(7, $input, $state)              (: EQName^Token :)
      return $state
    else if ($state[$p:l1] = 71) then                       (: 'ancestor' :)
      let $state := p:shift(71, $input, $state)             (: 'ancestor' :)
      return $state
    else if ($state[$p:l1] = 72) then                       (: 'ancestor-or-self' :)
      let $state := p:shift(72, $input, $state)             (: 'ancestor-or-self' :)
      return $state
    else if ($state[$p:l1] = 73) then                       (: 'and' :)
      let $state := p:shift(73, $input, $state)             (: 'and' :)
      return $state
    else if ($state[$p:l1] = 75) then                       (: 'ascending' :)
      let $state := p:shift(75, $input, $state)             (: 'ascending' :)
      return $state
    else if ($state[$p:l1] = 81) then                       (: 'case' :)
      let $state := p:shift(81, $input, $state)             (: 'case' :)
      return $state
    else if ($state[$p:l1] = 82) then                       (: 'cast' :)
      let $state := p:shift(82, $input, $state)             (: 'cast' :)
      return $state
    else if ($state[$p:l1] = 83) then                       (: 'castable' :)
      let $state := p:shift(83, $input, $state)             (: 'castable' :)
      return $state
    else if ($state[$p:l1] = 85) then                       (: 'child' :)
      let $state := p:shift(85, $input, $state)             (: 'child' :)
      return $state
    else if ($state[$p:l1] = 86) then                       (: 'collation' :)
      let $state := p:shift(86, $input, $state)             (: 'collation' :)
      return $state
    else if ($state[$p:l1] = 91) then                       (: 'count' :)
      let $state := p:shift(91, $input, $state)             (: 'count' :)
      return $state
    else if ($state[$p:l1] = 94) then                       (: 'declare' :)
      let $state := p:shift(94, $input, $state)             (: 'declare' :)
      return $state
    else if ($state[$p:l1] = 95) then                       (: 'default' :)
      let $state := p:shift(95, $input, $state)             (: 'default' :)
      return $state
    else if ($state[$p:l1] = 96) then                       (: 'descendant' :)
      let $state := p:shift(96, $input, $state)             (: 'descendant' :)
      return $state
    else if ($state[$p:l1] = 97) then                       (: 'descendant-or-self' :)
      let $state := p:shift(97, $input, $state)             (: 'descendant-or-self' :)
      return $state
    else if ($state[$p:l1] = 98) then                       (: 'descending' :)
      let $state := p:shift(98, $input, $state)             (: 'descending' :)
      return $state
    else if ($state[$p:l1] = 100) then                      (: 'div' :)
      let $state := p:shift(100, $input, $state)            (: 'div' :)
      return $state
    else if ($state[$p:l1] = 101) then                      (: 'document' :)
      let $state := p:shift(101, $input, $state)            (: 'document' :)
      return $state
    else if ($state[$p:l1] = 104) then                      (: 'else' :)
      let $state := p:shift(104, $input, $state)            (: 'else' :)
      return $state
    else if ($state[$p:l1] = 105) then                      (: 'empty' :)
      let $state := p:shift(105, $input, $state)            (: 'empty' :)
      return $state
    else if ($state[$p:l1] = 108) then                      (: 'end' :)
      let $state := p:shift(108, $input, $state)            (: 'end' :)
      return $state
    else if ($state[$p:l1] = 109) then                      (: 'eq' :)
      let $state := p:shift(109, $input, $state)            (: 'eq' :)
      return $state
    else if ($state[$p:l1] = 110) then                      (: 'every' :)
      let $state := p:shift(110, $input, $state)            (: 'every' :)
      return $state
    else if ($state[$p:l1] = 111) then                      (: 'except' :)
      let $state := p:shift(111, $input, $state)            (: 'except' :)
      return $state
    else if ($state[$p:l1] = 113) then                      (: 'following' :)
      let $state := p:shift(113, $input, $state)            (: 'following' :)
      return $state
    else if ($state[$p:l1] = 114) then                      (: 'following-sibling' :)
      let $state := p:shift(114, $input, $state)            (: 'following-sibling' :)
      return $state
    else if ($state[$p:l1] = 115) then                      (: 'for' :)
      let $state := p:shift(115, $input, $state)            (: 'for' :)
      return $state
    else if ($state[$p:l1] = 117) then                      (: 'ge' :)
      let $state := p:shift(117, $input, $state)            (: 'ge' :)
      return $state
    else if ($state[$p:l1] = 119) then                      (: 'group' :)
      let $state := p:shift(119, $input, $state)            (: 'group' :)
      return $state
    else if ($state[$p:l1] = 121) then                      (: 'gt' :)
      let $state := p:shift(121, $input, $state)            (: 'gt' :)
      return $state
    else if ($state[$p:l1] = 122) then                      (: 'idiv' :)
      let $state := p:shift(122, $input, $state)            (: 'idiv' :)
      return $state
    else if ($state[$p:l1] = 124) then                      (: 'import' :)
      let $state := p:shift(124, $input, $state)            (: 'import' :)
      return $state
    else if ($state[$p:l1] = 128) then                      (: 'instance' :)
      let $state := p:shift(128, $input, $state)            (: 'instance' :)
      return $state
    else if ($state[$p:l1] = 129) then                      (: 'intersect' :)
      let $state := p:shift(129, $input, $state)            (: 'intersect' :)
      return $state
    else if ($state[$p:l1] = 130) then                      (: 'is' :)
      let $state := p:shift(130, $input, $state)            (: 'is' :)
      return $state
    else if ($state[$p:l1] = 133) then                      (: 'le' :)
      let $state := p:shift(133, $input, $state)            (: 'le' :)
      return $state
    else if ($state[$p:l1] = 135) then                      (: 'let' :)
      let $state := p:shift(135, $input, $state)            (: 'let' :)
      return $state
    else if ($state[$p:l1] = 136) then                      (: 'lt' :)
      let $state := p:shift(136, $input, $state)            (: 'lt' :)
      return $state
    else if ($state[$p:l1] = 138) then                      (: 'mod' :)
      let $state := p:shift(138, $input, $state)            (: 'mod' :)
      return $state
    else if ($state[$p:l1] = 139) then                      (: 'module' :)
      let $state := p:shift(139, $input, $state)            (: 'module' :)
      return $state
    else if ($state[$p:l1] = 140) then                      (: 'namespace' :)
      let $state := p:shift(140, $input, $state)            (: 'namespace' :)
      return $state
    else if ($state[$p:l1] = 142) then                      (: 'ne' :)
      let $state := p:shift(142, $input, $state)            (: 'ne' :)
      return $state
    else if ($state[$p:l1] = 148) then                      (: 'only' :)
      let $state := p:shift(148, $input, $state)            (: 'only' :)
      return $state
    else if ($state[$p:l1] = 150) then                      (: 'or' :)
      let $state := p:shift(150, $input, $state)            (: 'or' :)
      return $state
    else if ($state[$p:l1] = 151) then                      (: 'order' :)
      let $state := p:shift(151, $input, $state)            (: 'order' :)
      return $state
    else if ($state[$p:l1] = 152) then                      (: 'ordered' :)
      let $state := p:shift(152, $input, $state)            (: 'ordered' :)
      return $state
    else if ($state[$p:l1] = 154) then                      (: 'parent' :)
      let $state := p:shift(154, $input, $state)            (: 'parent' :)
      return $state
    else if ($state[$p:l1] = 158) then                      (: 'preceding' :)
      let $state := p:shift(158, $input, $state)            (: 'preceding' :)
      return $state
    else if ($state[$p:l1] = 159) then                      (: 'preceding-sibling' :)
      let $state := p:shift(159, $input, $state)            (: 'preceding-sibling' :)
      return $state
    else if ($state[$p:l1] = 163) then                      (: 'return' :)
      let $state := p:shift(163, $input, $state)            (: 'return' :)
      return $state
    else if ($state[$p:l1] = 164) then                      (: 'satisfies' :)
      let $state := p:shift(164, $input, $state)            (: 'satisfies' :)
      return $state
    else if ($state[$p:l1] = 168) then                      (: 'self' :)
      let $state := p:shift(168, $input, $state)            (: 'self' :)
      return $state
    else if ($state[$p:l1] = 170) then                      (: 'some' :)
      let $state := p:shift(170, $input, $state)            (: 'some' :)
      return $state
    else if ($state[$p:l1] = 171) then                      (: 'stable' :)
      let $state := p:shift(171, $input, $state)            (: 'stable' :)
      return $state
    else if ($state[$p:l1] = 172) then                      (: 'start' :)
      let $state := p:shift(172, $input, $state)            (: 'start' :)
      return $state
    else if ($state[$p:l1] = 178) then                      (: 'to' :)
      let $state := p:shift(178, $input, $state)            (: 'to' :)
      return $state
    else if ($state[$p:l1] = 179) then                      (: 'treat' :)
      let $state := p:shift(179, $input, $state)            (: 'treat' :)
      return $state
    else if ($state[$p:l1] = 180) then                      (: 'try' :)
      let $state := p:shift(180, $input, $state)            (: 'try' :)
      return $state
    else if ($state[$p:l1] = 184) then                      (: 'union' :)
      let $state := p:shift(184, $input, $state)            (: 'union' :)
      return $state
    else if ($state[$p:l1] = 185) then                      (: 'unordered' :)
      let $state := p:shift(185, $input, $state)            (: 'unordered' :)
      return $state
    else if ($state[$p:l1] = 186) then                      (: 'validate' :)
      let $state := p:shift(186, $input, $state)            (: 'validate' :)
      return $state
    else if ($state[$p:l1] = 190) then                      (: 'where' :)
      let $state := p:shift(190, $input, $state)            (: 'where' :)
      return $state
    else if ($state[$p:error]) then
      $state
    else
      let $state := p:shift(192, $input, $state)            (: 'xquery' :)
      return $state
  return p:reduce($state, "FunctionName", $count)
};

(:~
 : Parse EQName.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-EQName($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:lookahead1(202, $input, $state)           (: EQName^Token | 'ancestor' | 'ancestor-or-self' | 'and' |
                                                               'ascending' | 'attribute' | 'case' | 'cast' |
                                                               'castable' | 'child' | 'collation' | 'comment' |
                                                               'count' | 'declare' | 'default' | 'descendant' |
                                                               'descendant-or-self' | 'descending' | 'div' |
                                                               'document' | 'document-node' | 'element' | 'else' |
                                                               'empty' | 'empty-sequence' | 'end' | 'eq' | 'every' |
                                                               'except' | 'following' | 'following-sibling' | 'for' |
                                                               'function' | 'ge' | 'group' | 'gt' | 'idiv' | 'if' |
                                                               'import' | 'instance' | 'intersect' | 'is' | 'item' |
                                                               'le' | 'let' | 'lt' | 'mod' | 'module' | 'namespace' |
                                                               'namespace-node' | 'ne' | 'node' | 'only' | 'or' |
                                                               'order' | 'ordered' | 'parent' | 'preceding' |
                                                               'preceding-sibling' | 'processing-instruction' |
                                                               'return' | 'satisfies' | 'schema-attribute' |
                                                               'schema-element' | 'self' | 'some' | 'stable' | 'start' |
                                                               'switch' | 'text' | 'to' | 'treat' | 'try' |
                                                               'typeswitch' | 'union' | 'unordered' | 'validate' |
                                                               'where' | 'xquery' :)
  let $state :=
    if ($state[$p:l1] = 77) then                            (: 'attribute' :)
      let $state := p:shift(77, $input, $state)             (: 'attribute' :)
      return $state
    else if ($state[$p:l1] = 87) then                       (: 'comment' :)
      let $state := p:shift(87, $input, $state)             (: 'comment' :)
      return $state
    else if ($state[$p:l1] = 102) then                      (: 'document-node' :)
      let $state := p:shift(102, $input, $state)            (: 'document-node' :)
      return $state
    else if ($state[$p:l1] = 103) then                      (: 'element' :)
      let $state := p:shift(103, $input, $state)            (: 'element' :)
      return $state
    else if ($state[$p:l1] = 106) then                      (: 'empty-sequence' :)
      let $state := p:shift(106, $input, $state)            (: 'empty-sequence' :)
      return $state
    else if ($state[$p:l1] = 116) then                      (: 'function' :)
      let $state := p:shift(116, $input, $state)            (: 'function' :)
      return $state
    else if ($state[$p:l1] = 123) then                      (: 'if' :)
      let $state := p:shift(123, $input, $state)            (: 'if' :)
      return $state
    else if ($state[$p:l1] = 131) then                      (: 'item' :)
      let $state := p:shift(131, $input, $state)            (: 'item' :)
      return $state
    else if ($state[$p:l1] = 141) then                      (: 'namespace-node' :)
      let $state := p:shift(141, $input, $state)            (: 'namespace-node' :)
      return $state
    else if ($state[$p:l1] = 146) then                      (: 'node' :)
      let $state := p:shift(146, $input, $state)            (: 'node' :)
      return $state
    else if ($state[$p:l1] = 162) then                      (: 'processing-instruction' :)
      let $state := p:shift(162, $input, $state)            (: 'processing-instruction' :)
      return $state
    else if ($state[$p:l1] = 166) then                      (: 'schema-attribute' :)
      let $state := p:shift(166, $input, $state)            (: 'schema-attribute' :)
      return $state
    else if ($state[$p:l1] = 167) then                      (: 'schema-element' :)
      let $state := p:shift(167, $input, $state)            (: 'schema-element' :)
      return $state
    else if ($state[$p:l1] = 175) then                      (: 'switch' :)
      let $state := p:shift(175, $input, $state)            (: 'switch' :)
      return $state
    else if ($state[$p:l1] = 176) then                      (: 'text' :)
      let $state := p:shift(176, $input, $state)            (: 'text' :)
      return $state
    else if ($state[$p:l1] = 183) then                      (: 'typeswitch' :)
      let $state := p:shift(183, $input, $state)            (: 'typeswitch' :)
      return $state
    else if ($state[$p:error]) then
      $state
    else
      let $state := p:parse-FunctionName($input, $state)
      return $state
  return p:reduce($state, "EQName", $count)
};

(:~
 : Parse the 1st loop of production DecimalFormatDecl (zero or more). Use
 : tail recursion for iteratively updating the parser state.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-DecimalFormatDecl-1($input as xs:string, $state as item()+) as item()+
{
  if ($state[$p:error]) then
    $state
  else
    let $state := p:lookahead1W(158, $input, $state)        (: S^WS | ('(' ':') | ';' | 'NaN' | 'decimal-separator' |
                                                               'digit' | 'grouping-separator' | 'infinity' |
                                                               'minus-sign' | 'pattern-separator' | 'per-mille' |
                                                               'percent' | 'zero-digit' :)
    return
      if ($state[$p:l1] = 51) then                          (: ';' :)
        $state
      else
        let $state := p:parse-DFPropertyName($input, $state)
        let $state := p:lookahead1W(47, $input, $state)     (: S^WS | ('(' ':') | '=' :)
        let $state := p:shift(59, $input, $state)           (: '=' :)
        let $state := p:lookahead1W(35, $input, $state)     (: StringLiteral | S^WS | ('(' ':') :)
        let $state := p:shift(12, $input, $state)           (: StringLiteral :)
        return p:parse-DecimalFormatDecl-1($input, $state)
};

(:~
 : Parse DecimalFormatDecl.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-DecimalFormatDecl($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:shift(94, $input, $state)                 (: 'declare' :)
  let $state := p:lookahead1W(106, $input, $state)          (: S^WS | ('(' ':') | 'decimal-format' | 'default' :)
  let $state :=
    if ($state[$p:l1] = 92) then                            (: 'decimal-format' :)
      let $state := p:shift(92, $input, $state)             (: 'decimal-format' :)
      let $state := p:lookahead1W(205, $input, $state)      (: EQName^Token | S^WS | ('(' ':') | 'ancestor' |
                                                               'ancestor-or-self' | 'and' | 'ascending' | 'attribute' |
                                                               'case' | 'cast' | 'castable' | 'child' | 'collation' |
                                                               'comment' | 'count' | 'declare' | 'default' |
                                                               'descendant' | 'descendant-or-self' | 'descending' |
                                                               'div' | 'document' | 'document-node' | 'element' |
                                                               'else' | 'empty' | 'empty-sequence' | 'end' | 'eq' |
                                                               'every' | 'except' | 'following' | 'following-sibling' |
                                                               'for' | 'function' | 'ge' | 'group' | 'gt' | 'idiv' |
                                                               'if' | 'import' | 'instance' | 'intersect' | 'is' |
                                                               'item' | 'le' | 'let' | 'lt' | 'mod' | 'module' |
                                                               'namespace' | 'namespace-node' | 'ne' | 'node' | 'only' |
                                                               'or' | 'order' | 'ordered' | 'parent' | 'preceding' |
                                                               'preceding-sibling' | 'processing-instruction' |
                                                               'return' | 'satisfies' | 'schema-attribute' |
                                                               'schema-element' | 'self' | 'some' | 'stable' | 'start' |
                                                               'switch' | 'text' | 'to' | 'treat' | 'try' |
                                                               'typeswitch' | 'union' | 'unordered' | 'validate' |
                                                               'where' | 'xquery' :)
      let $state := p:parse-EQName($input, $state)
      return $state
    else if ($state[$p:error]) then
      $state
    else
      let $state := p:shift(95, $input, $state)             (: 'default' :)
      let $state := p:lookahead1W(58, $input, $state)       (: S^WS | ('(' ':') | 'decimal-format' :)
      let $state := p:shift(92, $input, $state)             (: 'decimal-format' :)
      return $state
  let $state := p:parse-DecimalFormatDecl-1($input, $state)
  return p:reduce($state, "DecimalFormatDecl", $count)
};

(:~
 : Parse InheritMode.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-InheritMode($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:lookahead1(29, $input, $state)            (: 'inherit' | 'no-inherit' :)
  let $state :=
    if ($state[$p:l1] = 127) then                           (: 'inherit' :)
      let $state := p:shift(127, $input, $state)            (: 'inherit' :)
      return $state
    else if ($state[$p:error]) then
      $state
    else
      let $state := p:shift(144, $input, $state)            (: 'no-inherit' :)
      return $state
  return p:reduce($state, "InheritMode", $count)
};

(:~
 : Parse PreserveMode.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-PreserveMode($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:lookahead1(30, $input, $state)            (: 'no-preserve' | 'preserve' :)
  let $state :=
    if ($state[$p:l1] = 160) then                           (: 'preserve' :)
      let $state := p:shift(160, $input, $state)            (: 'preserve' :)
      return $state
    else if ($state[$p:error]) then
      $state
    else
      let $state := p:shift(145, $input, $state)            (: 'no-preserve' :)
      return $state
  return p:reduce($state, "PreserveMode", $count)
};

(:~
 : Parse CopyNamespacesDecl.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-CopyNamespacesDecl($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:shift(94, $input, $state)                 (: 'declare' :)
  let $state := p:lookahead1W(57, $input, $state)           (: S^WS | ('(' ':') | 'copy-namespaces' :)
  let $state := p:shift(90, $input, $state)                 (: 'copy-namespaces' :)
  let $state := p:lookahead1W(116, $input, $state)          (: S^WS | ('(' ':') | 'no-preserve' | 'preserve' :)
  let $state := p:parse-PreserveMode($input, $state)
  let $state := p:lookahead1W(43, $input, $state)           (: S^WS | ('(' ':') | ',' :)
  let $state := p:shift(40, $input, $state)                 (: ',' :)
  let $state := p:lookahead1W(113, $input, $state)          (: S^WS | ('(' ':') | 'inherit' | 'no-inherit' :)
  let $state := p:parse-InheritMode($input, $state)
  return p:reduce($state, "CopyNamespacesDecl", $count)
};

(:~
 : Parse EmptyOrderDecl.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-EmptyOrderDecl($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:shift(94, $input, $state)                 (: 'declare' :)
  let $state := p:lookahead1W(59, $input, $state)           (: S^WS | ('(' ':') | 'default' :)
  let $state := p:shift(95, $input, $state)                 (: 'default' :)
  let $state := p:lookahead1W(70, $input, $state)           (: S^WS | ('(' ':') | 'order' :)
  let $state := p:shift(151, $input, $state)                (: 'order' :)
  let $state := p:lookahead1W(62, $input, $state)           (: S^WS | ('(' ':') | 'empty' :)
  let $state := p:shift(105, $input, $state)                (: 'empty' :)
  let $state := p:lookahead1W(112, $input, $state)          (: S^WS | ('(' ':') | 'greatest' | 'least' :)
  let $state :=
    if ($state[$p:l1] = 118) then                           (: 'greatest' :)
      let $state := p:shift(118, $input, $state)            (: 'greatest' :)
      return $state
    else if ($state[$p:error]) then
      $state
    else
      let $state := p:shift(134, $input, $state)            (: 'least' :)
      return $state
  return p:reduce($state, "EmptyOrderDecl", $count)
};

(:~
 : Parse OrderingModeDecl.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-OrderingModeDecl($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:shift(94, $input, $state)                 (: 'declare' :)
  let $state := p:lookahead1W(71, $input, $state)           (: S^WS | ('(' ':') | 'ordering' :)
  let $state := p:shift(153, $input, $state)                (: 'ordering' :)
  let $state := p:lookahead1W(119, $input, $state)          (: S^WS | ('(' ':') | 'ordered' | 'unordered' :)
  let $state :=
    if ($state[$p:l1] = 152) then                           (: 'ordered' :)
      let $state := p:shift(152, $input, $state)            (: 'ordered' :)
      return $state
    else if ($state[$p:error]) then
      $state
    else
      let $state := p:shift(185, $input, $state)            (: 'unordered' :)
      return $state
  return p:reduce($state, "OrderingModeDecl", $count)
};

(:~
 : Parse ConstructionDecl.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-ConstructionDecl($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:shift(94, $input, $state)                 (: 'declare' :)
  let $state := p:lookahead1W(55, $input, $state)           (: S^WS | ('(' ':') | 'construction' :)
  let $state := p:shift(88, $input, $state)                 (: 'construction' :)
  let $state := p:lookahead1W(120, $input, $state)          (: S^WS | ('(' ':') | 'preserve' | 'strip' :)
  let $state :=
    if ($state[$p:l1] = 174) then                           (: 'strip' :)
      let $state := p:shift(174, $input, $state)            (: 'strip' :)
      return $state
    else if ($state[$p:error]) then
      $state
    else
      let $state := p:shift(160, $input, $state)            (: 'preserve' :)
      return $state
  return p:reduce($state, "ConstructionDecl", $count)
};

(:~
 : Parse BaseURIDecl.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-BaseURIDecl($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:shift(94, $input, $state)                 (: 'declare' :)
  let $state := p:lookahead1W(50, $input, $state)           (: S^WS | ('(' ':') | 'base-uri' :)
  let $state := p:shift(78, $input, $state)                 (: 'base-uri' :)
  let $state := p:lookahead1W(33, $input, $state)           (: URILiteral | S^WS | ('(' ':') :)
  let $state := p:shift(8, $input, $state)                  (: URILiteral :)
  return p:reduce($state, "BaseURIDecl", $count)
};

(:~
 : Parse DefaultCollationDecl.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-DefaultCollationDecl($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:shift(94, $input, $state)                 (: 'declare' :)
  let $state := p:lookahead1W(59, $input, $state)           (: S^WS | ('(' ':') | 'default' :)
  let $state := p:shift(95, $input, $state)                 (: 'default' :)
  let $state := p:lookahead1W(54, $input, $state)           (: S^WS | ('(' ':') | 'collation' :)
  let $state := p:shift(86, $input, $state)                 (: 'collation' :)
  let $state := p:lookahead1W(33, $input, $state)           (: URILiteral | S^WS | ('(' ':') :)
  let $state := p:shift(8, $input, $state)                  (: URILiteral :)
  return p:reduce($state, "DefaultCollationDecl", $count)
};

(:~
 : Parse BoundarySpaceDecl.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-BoundarySpaceDecl($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:shift(94, $input, $state)                 (: 'declare' :)
  let $state := p:lookahead1W(51, $input, $state)           (: S^WS | ('(' ':') | 'boundary-space' :)
  let $state := p:shift(79, $input, $state)                 (: 'boundary-space' :)
  let $state := p:lookahead1W(120, $input, $state)          (: S^WS | ('(' ':') | 'preserve' | 'strip' :)
  let $state :=
    if ($state[$p:l1] = 160) then                           (: 'preserve' :)
      let $state := p:shift(160, $input, $state)            (: 'preserve' :)
      return $state
    else if ($state[$p:error]) then
      $state
    else
      let $state := p:shift(174, $input, $state)            (: 'strip' :)
      return $state
  return p:reduce($state, "BoundarySpaceDecl", $count)
};

(:~
 : Parse Setter.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-Setter($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state :=
    if ($state[$p:l1] = 94) then                            (: 'declare' :)
      let $state := p:lookahead2W(150, $input, $state)      (: S^WS | ('(' ':') | 'base-uri' | 'boundary-space' |
                                                               'construction' | 'copy-namespaces' | 'decimal-format' |
                                                               'default' | 'ordering' :)
      let $state :=
        if ($state[$p:lk] = 24414) then                     (: 'declare' 'default' :)
          let $state := p:lookahead3W(134, $input, $state)  (: S^WS | ('(' ':') | 'collation' | 'decimal-format' |
                                                               'order' :)
          return $state
        else
          $state
      return $state
    else
      ($state[$p:l1], subsequence($state, $p:lk + 1))
  let $state :=
    if ($state[$p:lk] = 20318) then                         (: 'declare' 'boundary-space' :)
      let $state := p:parse-BoundarySpaceDecl($input, $state)
      return $state
    else if ($state[$p:lk] = 5660510) then                  (: 'declare' 'default' 'collation' :)
      let $state := p:parse-DefaultCollationDecl($input, $state)
      return $state
    else if ($state[$p:lk] = 20062) then                    (: 'declare' 'base-uri' :)
      let $state := p:parse-BaseURIDecl($input, $state)
      return $state
    else if ($state[$p:lk] = 22622) then                    (: 'declare' 'construction' :)
      let $state := p:parse-ConstructionDecl($input, $state)
      return $state
    else if ($state[$p:lk] = 39262) then                    (: 'declare' 'ordering' :)
      let $state := p:parse-OrderingModeDecl($input, $state)
      return $state
    else if ($state[$p:lk] = 9920350) then                  (: 'declare' 'default' 'order' :)
      let $state := p:parse-EmptyOrderDecl($input, $state)
      return $state
    else if ($state[$p:lk] = 23134) then                    (: 'declare' 'copy-namespaces' :)
      let $state := p:parse-CopyNamespacesDecl($input, $state)
      return $state
    else if ($state[$p:error]) then
      $state
    else
      let $state := p:parse-DecimalFormatDecl($input, $state)
      return $state
  return p:reduce($state, "Setter", $count)
};

(:~
 : Parse DefaultNamespaceDecl.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-DefaultNamespaceDecl($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:shift(94, $input, $state)                 (: 'declare' :)
  let $state := p:lookahead1W(59, $input, $state)           (: S^WS | ('(' ':') | 'default' :)
  let $state := p:shift(95, $input, $state)                 (: 'default' :)
  let $state := p:lookahead1W(107, $input, $state)          (: S^WS | ('(' ':') | 'element' | 'function' :)
  let $state :=
    if ($state[$p:l1] = 103) then                           (: 'element' :)
      let $state := p:shift(103, $input, $state)            (: 'element' :)
      return $state
    else if ($state[$p:error]) then
      $state
    else
      let $state := p:shift(116, $input, $state)            (: 'function' :)
      return $state
  let $state := p:lookahead1W(67, $input, $state)           (: S^WS | ('(' ':') | 'namespace' :)
  let $state := p:shift(140, $input, $state)                (: 'namespace' :)
  let $state := p:lookahead1W(33, $input, $state)           (: URILiteral | S^WS | ('(' ':') :)
  let $state := p:shift(8, $input, $state)                  (: URILiteral :)
  return p:reduce($state, "DefaultNamespaceDecl", $count)
};

(:~
 : Parse the 1st loop of production Prolog (zero or more). Use
 : tail recursion for iteratively updating the parser state.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-Prolog-1($input as xs:string, $state as item()+) as item()+
{
  if ($state[$p:error]) then
    $state
  else
    let $state := p:lookahead1W(217, $input, $state)        (: EOF | Wildcard | EQName^Token | IntegerLiteral |
                                                               DecimalLiteral | DoubleLiteral | StringLiteral | S^WS |
                                                               '$' | '(' | '(#' | ('(' ':') | '+' | '-' | '.' | '..' |
                                                               '/' | '//' | '<' | '<!--' | '<?' | '@' | 'ancestor' |
                                                               'ancestor-or-self' | 'and' | 'ascending' | 'attribute' |
                                                               'case' | 'cast' | 'castable' | 'child' | 'collation' |
                                                               'comment' | 'count' | 'declare' | 'default' |
                                                               'descendant' | 'descendant-or-self' | 'descending' |
                                                               'div' | 'document' | 'document-node' | 'element' |
                                                               'else' | 'empty' | 'empty-sequence' | 'end' | 'eq' |
                                                               'every' | 'except' | 'following' | 'following-sibling' |
                                                               'for' | 'function' | 'ge' | 'group' | 'gt' | 'idiv' |
                                                               'if' | 'import' | 'instance' | 'intersect' | 'is' |
                                                               'item' | 'le' | 'let' | 'lt' | 'mod' | 'module' |
                                                               'namespace' | 'namespace-node' | 'ne' | 'node' | 'only' |
                                                               'or' | 'order' | 'ordered' | 'parent' | 'preceding' |
                                                               'preceding-sibling' | 'processing-instruction' |
                                                               'return' | 'satisfies' | 'schema-attribute' |
                                                               'schema-element' | 'self' | 'some' | 'stable' | 'start' |
                                                               'switch' | 'text' | 'to' | 'treat' | 'try' |
                                                               'typeswitch' | 'union' | 'unordered' | 'validate' |
                                                               'where' | 'xquery' :)
    let $state :=
      if ($state[$p:l1] = 94) then                          (: 'declare' :)
        let $state := p:lookahead2W(179, $input, $state)    (: EOF | S^WS | '!=' | '#' | '%' | '(' | ('(' ':') | '*' |
                                                               '+' | ',' | '-' | '/' | '//' | '<' | '<<' | '<=' | '=' |
                                                               '>' | '>=' | '>>' | '[' | 'and' | 'base-uri' |
                                                               'boundary-space' | 'cast' | 'castable' | 'construction' |
                                                               'context' | 'copy-namespaces' | 'decimal-format' |
                                                               'default' | 'div' | 'eq' | 'except' | 'function' | 'ge' |
                                                               'gt' | 'idiv' | 'instance' | 'intersect' | 'is' | 'le' |
                                                               'lt' | 'mod' | 'namespace' | 'ne' | 'option' | 'or' |
                                                               'ordering' | 'to' | 'treat' | 'union' | 'variable' | '|' :)
        return $state
      else if ($state[$p:l1] = 124) then                    (: 'import' :)
        let $state := p:lookahead2W(168, $input, $state)    (: EOF | S^WS | '!=' | '#' | '(' | ('(' ':') | '*' | '+' |
                                                               ',' | '-' | '/' | '//' | '<' | '<<' | '<=' | '=' | '>' |
                                                               '>=' | '>>' | '[' | 'and' | 'cast' | 'castable' | 'div' |
                                                               'eq' | 'except' | 'ge' | 'gt' | 'idiv' | 'instance' |
                                                               'intersect' | 'is' | 'le' | 'lt' | 'mod' | 'module' |
                                                               'ne' | 'or' | 'schema' | 'to' | 'treat' | 'union' | '|' :)
        return $state
      else
        ($state[$p:l1], subsequence($state, $p:lk + 1))
    return
      if ($state[$p:lk] != 20062                            (: 'declare' 'base-uri' :)
      and $state[$p:lk] != 20318                            (: 'declare' 'boundary-space' :)
      and $state[$p:lk] != 22622                            (: 'declare' 'construction' :)
      and $state[$p:lk] != 23134                            (: 'declare' 'copy-namespaces' :)
      and $state[$p:lk] != 23646                            (: 'declare' 'decimal-format' :)
      and $state[$p:lk] != 24414                            (: 'declare' 'default' :)
      and $state[$p:lk] != 35708                            (: 'import' 'module' :)
      and $state[$p:lk] != 35934                            (: 'declare' 'namespace' :)
      and $state[$p:lk] != 39262                            (: 'declare' 'ordering' :)
      and $state[$p:lk] != 42364) then                      (: 'import' 'schema' :)
        $state
      else
        let $state :=
          if ($state[$p:l1] = 94) then                      (: 'declare' :)
            let $state := p:lookahead2W(151, $input, $state) (: S^WS | ('(' ':') | 'base-uri' | 'boundary-space' |
                                                                'construction' | 'copy-namespaces' | 'decimal-format' |
                                                                'default' | 'namespace' | 'ordering' :)
            let $state :=
              if ($state[$p:lk] = 24414) then               (: 'declare' 'default' :)
                let $state := p:lookahead3W(146, $input, $state) (: S^WS | ('(' ':') | 'collation' | 'decimal-format' |
                                                                    'element' | 'function' | 'order' :)
                return $state
              else
                $state
            return $state
          else
            ($state[$p:l1], subsequence($state, $p:lk + 1))
        let $state :=
          if ($state[$p:lk] = 6774622                       (: 'declare' 'default' 'element' :)
           or $state[$p:lk] = 7626590) then                 (: 'declare' 'default' 'function' :)
            let $state := p:parse-DefaultNamespaceDecl($input, $state)
            return $state
          else if ($state[$p:lk] = 35934) then              (: 'declare' 'namespace' :)
            let $state := p:parse-NamespaceDecl($input, $state)
            return $state
          else if ($state[$p:lk] = 124) then                (: 'import' :)
            let $state := p:parse-Import($input, $state)
            return $state
          else if ($state[$p:error]) then
            $state
          else
            let $state := p:parse-Setter($input, $state)
            return $state
        let $state := p:lookahead1W(46, $input, $state)     (: S^WS | ('(' ':') | ';' :)
        let $state := p:parse-Separator($input, $state)
        return p:parse-Prolog-1($input, $state)
};

(:~
 : Parse the 2nd loop of production Prolog (zero or more). Use
 : tail recursion for iteratively updating the parser state.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-Prolog-2($input as xs:string, $state as item()+) as item()+
{
  if ($state[$p:error]) then
    $state
  else
    let $state := p:lookahead1W(217, $input, $state)        (: EOF | Wildcard | EQName^Token | IntegerLiteral |
                                                               DecimalLiteral | DoubleLiteral | StringLiteral | S^WS |
                                                               '$' | '(' | '(#' | ('(' ':') | '+' | '-' | '.' | '..' |
                                                               '/' | '//' | '<' | '<!--' | '<?' | '@' | 'ancestor' |
                                                               'ancestor-or-self' | 'and' | 'ascending' | 'attribute' |
                                                               'case' | 'cast' | 'castable' | 'child' | 'collation' |
                                                               'comment' | 'count' | 'declare' | 'default' |
                                                               'descendant' | 'descendant-or-self' | 'descending' |
                                                               'div' | 'document' | 'document-node' | 'element' |
                                                               'else' | 'empty' | 'empty-sequence' | 'end' | 'eq' |
                                                               'every' | 'except' | 'following' | 'following-sibling' |
                                                               'for' | 'function' | 'ge' | 'group' | 'gt' | 'idiv' |
                                                               'if' | 'import' | 'instance' | 'intersect' | 'is' |
                                                               'item' | 'le' | 'let' | 'lt' | 'mod' | 'module' |
                                                               'namespace' | 'namespace-node' | 'ne' | 'node' | 'only' |
                                                               'or' | 'order' | 'ordered' | 'parent' | 'preceding' |
                                                               'preceding-sibling' | 'processing-instruction' |
                                                               'return' | 'satisfies' | 'schema-attribute' |
                                                               'schema-element' | 'self' | 'some' | 'stable' | 'start' |
                                                               'switch' | 'text' | 'to' | 'treat' | 'try' |
                                                               'typeswitch' | 'union' | 'unordered' | 'validate' |
                                                               'where' | 'xquery' :)
    let $state :=
      if ($state[$p:l1] = 94) then                          (: 'declare' :)
        let $state := p:lookahead2W(175, $input, $state)    (: EOF | S^WS | '!=' | '#' | '%' | '(' | ('(' ':') | '*' |
                                                               '+' | ',' | '-' | '/' | '//' | '<' | '<<' | '<=' | '=' |
                                                               '>' | '>=' | '>>' | '[' | 'and' | 'cast' | 'castable' |
                                                               'context' | 'div' | 'eq' | 'except' | 'function' | 'ge' |
                                                               'gt' | 'idiv' | 'instance' | 'intersect' | 'is' | 'le' |
                                                               'lt' | 'mod' | 'ne' | 'option' | 'or' | 'to' | 'treat' |
                                                               'union' | 'variable' | '|' :)
        return $state
      else
        ($state[$p:l1], subsequence($state, $p:lk + 1))
    return
      if ($state[$p:lk] != 8030                             (: 'declare' '%' :)
      and $state[$p:lk] != 22878                            (: 'declare' 'context' :)
      and $state[$p:lk] != 29790                            (: 'declare' 'function' :)
      and $state[$p:lk] != 38238                            (: 'declare' 'option' :)
      and $state[$p:lk] != 47966) then                      (: 'declare' 'variable' :)
        $state
      else
        let $state :=
          if ($state[$p:l1] = 94) then                      (: 'declare' :)
            let $state := p:lookahead2W(145, $input, $state) (: S^WS | '%' | ('(' ':') | 'context' | 'function' |
                                                                'option' | 'variable' :)
            return $state
          else
            ($state[$p:l1], subsequence($state, $p:lk + 1))
        let $state :=
          if ($state[$p:lk] = 22878) then                   (: 'declare' 'context' :)
            let $state := p:parse-ContextItemDecl($input, $state)
            return $state
          else if ($state[$p:lk] = 38238) then              (: 'declare' 'option' :)
            let $state := p:parse-OptionDecl($input, $state)
            return $state
          else if ($state[$p:error]) then
            $state
          else
            let $state := p:parse-AnnotatedDecl($input, $state)
            return $state
        let $state := p:lookahead1W(46, $input, $state)     (: S^WS | ('(' ':') | ';' :)
        let $state := p:parse-Separator($input, $state)
        return p:parse-Prolog-2($input, $state)
};

(:~
 : Parse Prolog.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-Prolog($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:parse-Prolog-1($input, $state)
  let $state := p:parse-Prolog-2($input, $state)
  return p:reduce($state, "Prolog", $count)
};

(:~
 : Parse NCName.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-NCName($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:lookahead1(164, $input, $state)           (: NCName^Token | 'and' | 'ascending' | 'case' | 'cast' |
                                                               'castable' | 'collation' | 'count' | 'default' |
                                                               'descending' | 'div' | 'else' | 'empty' | 'end' | 'eq' |
                                                               'except' | 'for' | 'ge' | 'group' | 'gt' | 'idiv' |
                                                               'instance' | 'intersect' | 'is' | 'le' | 'let' | 'lt' |
                                                               'mod' | 'ne' | 'only' | 'or' | 'order' | 'return' |
                                                               'satisfies' | 'stable' | 'start' | 'to' | 'treat' |
                                                               'union' | 'where' :)
  let $state :=
    if ($state[$p:l1] = 21) then                            (: NCName^Token :)
      let $state := p:shift(21, $input, $state)             (: NCName^Token :)
      return $state
    else if ($state[$p:l1] = 73) then                       (: 'and' :)
      let $state := p:shift(73, $input, $state)             (: 'and' :)
      return $state
    else if ($state[$p:l1] = 75) then                       (: 'ascending' :)
      let $state := p:shift(75, $input, $state)             (: 'ascending' :)
      return $state
    else if ($state[$p:l1] = 81) then                       (: 'case' :)
      let $state := p:shift(81, $input, $state)             (: 'case' :)
      return $state
    else if ($state[$p:l1] = 82) then                       (: 'cast' :)
      let $state := p:shift(82, $input, $state)             (: 'cast' :)
      return $state
    else if ($state[$p:l1] = 83) then                       (: 'castable' :)
      let $state := p:shift(83, $input, $state)             (: 'castable' :)
      return $state
    else if ($state[$p:l1] = 86) then                       (: 'collation' :)
      let $state := p:shift(86, $input, $state)             (: 'collation' :)
      return $state
    else if ($state[$p:l1] = 91) then                       (: 'count' :)
      let $state := p:shift(91, $input, $state)             (: 'count' :)
      return $state
    else if ($state[$p:l1] = 95) then                       (: 'default' :)
      let $state := p:shift(95, $input, $state)             (: 'default' :)
      return $state
    else if ($state[$p:l1] = 98) then                       (: 'descending' :)
      let $state := p:shift(98, $input, $state)             (: 'descending' :)
      return $state
    else if ($state[$p:l1] = 100) then                      (: 'div' :)
      let $state := p:shift(100, $input, $state)            (: 'div' :)
      return $state
    else if ($state[$p:l1] = 104) then                      (: 'else' :)
      let $state := p:shift(104, $input, $state)            (: 'else' :)
      return $state
    else if ($state[$p:l1] = 105) then                      (: 'empty' :)
      let $state := p:shift(105, $input, $state)            (: 'empty' :)
      return $state
    else if ($state[$p:l1] = 108) then                      (: 'end' :)
      let $state := p:shift(108, $input, $state)            (: 'end' :)
      return $state
    else if ($state[$p:l1] = 109) then                      (: 'eq' :)
      let $state := p:shift(109, $input, $state)            (: 'eq' :)
      return $state
    else if ($state[$p:l1] = 111) then                      (: 'except' :)
      let $state := p:shift(111, $input, $state)            (: 'except' :)
      return $state
    else if ($state[$p:l1] = 115) then                      (: 'for' :)
      let $state := p:shift(115, $input, $state)            (: 'for' :)
      return $state
    else if ($state[$p:l1] = 117) then                      (: 'ge' :)
      let $state := p:shift(117, $input, $state)            (: 'ge' :)
      return $state
    else if ($state[$p:l1] = 119) then                      (: 'group' :)
      let $state := p:shift(119, $input, $state)            (: 'group' :)
      return $state
    else if ($state[$p:l1] = 121) then                      (: 'gt' :)
      let $state := p:shift(121, $input, $state)            (: 'gt' :)
      return $state
    else if ($state[$p:l1] = 122) then                      (: 'idiv' :)
      let $state := p:shift(122, $input, $state)            (: 'idiv' :)
      return $state
    else if ($state[$p:l1] = 128) then                      (: 'instance' :)
      let $state := p:shift(128, $input, $state)            (: 'instance' :)
      return $state
    else if ($state[$p:l1] = 129) then                      (: 'intersect' :)
      let $state := p:shift(129, $input, $state)            (: 'intersect' :)
      return $state
    else if ($state[$p:l1] = 130) then                      (: 'is' :)
      let $state := p:shift(130, $input, $state)            (: 'is' :)
      return $state
    else if ($state[$p:l1] = 133) then                      (: 'le' :)
      let $state := p:shift(133, $input, $state)            (: 'le' :)
      return $state
    else if ($state[$p:l1] = 135) then                      (: 'let' :)
      let $state := p:shift(135, $input, $state)            (: 'let' :)
      return $state
    else if ($state[$p:l1] = 136) then                      (: 'lt' :)
      let $state := p:shift(136, $input, $state)            (: 'lt' :)
      return $state
    else if ($state[$p:l1] = 138) then                      (: 'mod' :)
      let $state := p:shift(138, $input, $state)            (: 'mod' :)
      return $state
    else if ($state[$p:l1] = 142) then                      (: 'ne' :)
      let $state := p:shift(142, $input, $state)            (: 'ne' :)
      return $state
    else if ($state[$p:l1] = 148) then                      (: 'only' :)
      let $state := p:shift(148, $input, $state)            (: 'only' :)
      return $state
    else if ($state[$p:l1] = 150) then                      (: 'or' :)
      let $state := p:shift(150, $input, $state)            (: 'or' :)
      return $state
    else if ($state[$p:l1] = 151) then                      (: 'order' :)
      let $state := p:shift(151, $input, $state)            (: 'order' :)
      return $state
    else if ($state[$p:l1] = 163) then                      (: 'return' :)
      let $state := p:shift(163, $input, $state)            (: 'return' :)
      return $state
    else if ($state[$p:l1] = 164) then                      (: 'satisfies' :)
      let $state := p:shift(164, $input, $state)            (: 'satisfies' :)
      return $state
    else if ($state[$p:l1] = 171) then                      (: 'stable' :)
      let $state := p:shift(171, $input, $state)            (: 'stable' :)
      return $state
    else if ($state[$p:l1] = 172) then                      (: 'start' :)
      let $state := p:shift(172, $input, $state)            (: 'start' :)
      return $state
    else if ($state[$p:l1] = 178) then                      (: 'to' :)
      let $state := p:shift(178, $input, $state)            (: 'to' :)
      return $state
    else if ($state[$p:l1] = 179) then                      (: 'treat' :)
      let $state := p:shift(179, $input, $state)            (: 'treat' :)
      return $state
    else if ($state[$p:l1] = 184) then                      (: 'union' :)
      let $state := p:shift(184, $input, $state)            (: 'union' :)
      return $state
    else if ($state[$p:error]) then
      $state
    else
      let $state := p:shift(190, $input, $state)            (: 'where' :)
      return $state
  return p:reduce($state, "NCName", $count)
};

(:~
 : Parse ModuleDecl.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-ModuleDecl($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:lookahead1(17, $input, $state)            (: 'module' :)
  let $state := p:shift(139, $input, $state)                (: 'module' :)
  let $state := p:lookahead1W(67, $input, $state)           (: S^WS | ('(' ':') | 'namespace' :)
  let $state := p:shift(140, $input, $state)                (: 'namespace' :)
  let $state := p:lookahead1W(166, $input, $state)          (: NCName^Token | S^WS | ('(' ':') | 'and' | 'ascending' |
                                                               'case' | 'cast' | 'castable' | 'collation' | 'count' |
                                                               'default' | 'descending' | 'div' | 'else' | 'empty' |
                                                               'end' | 'eq' | 'except' | 'for' | 'ge' | 'group' | 'gt' |
                                                               'idiv' | 'instance' | 'intersect' | 'is' | 'le' | 'let' |
                                                               'lt' | 'mod' | 'ne' | 'only' | 'or' | 'order' |
                                                               'return' | 'satisfies' | 'stable' | 'start' | 'to' |
                                                               'treat' | 'union' | 'where' :)
  let $state := p:parse-NCName($input, $state)
  let $state := p:lookahead1W(47, $input, $state)           (: S^WS | ('(' ':') | '=' :)
  let $state := p:shift(59, $input, $state)                 (: '=' :)
  let $state := p:lookahead1W(33, $input, $state)           (: URILiteral | S^WS | ('(' ':') :)
  let $state := p:shift(8, $input, $state)                  (: URILiteral :)
  let $state := p:lookahead1W(46, $input, $state)           (: S^WS | ('(' ':') | ';' :)
  let $state := p:parse-Separator($input, $state)
  return p:reduce($state, "ModuleDecl", $count)
};

(:~
 : Parse LibraryModule.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-LibraryModule($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:parse-ModuleDecl($input, $state)
  let $state := p:lookahead1W(31, $input, $state)           (: EPSILON | S^WS | ('(' ':') :)
  let $state := p:parse-Prolog($input, $state)
  return p:reduce($state, "LibraryModule", $count)
};

(:~
 : Parse Separator.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-Separator($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:shift(51, $input, $state)                 (: ';' :)
  return p:reduce($state, "Separator", $count)
};

(:~
 : Parse VersionDecl.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-VersionDecl($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:shift(192, $input, $state)                (: 'xquery' :)
  let $state := p:lookahead1W(108, $input, $state)          (: S^WS | ('(' ':') | 'encoding' | 'version' :)
  let $state :=
    if ($state[$p:l1] = 107) then                           (: 'encoding' :)
      let $state := p:shift(107, $input, $state)            (: 'encoding' :)
      let $state := p:lookahead1W(35, $input, $state)       (: StringLiteral | S^WS | ('(' ':') :)
      let $state := p:shift(12, $input, $state)             (: StringLiteral :)
      return $state
    else if ($state[$p:error]) then
      $state
    else
      let $state := p:shift(188, $input, $state)            (: 'version' :)
      let $state := p:lookahead1W(35, $input, $state)       (: StringLiteral | S^WS | ('(' ':') :)
      let $state := p:shift(12, $input, $state)             (: StringLiteral :)
      let $state := p:lookahead1W(99, $input, $state)       (: S^WS | ('(' ':') | ';' | 'encoding' :)
      let $state :=
        if ($state[$p:error]) then
          $state
        else if ($state[$p:l1] = 107) then                  (: 'encoding' :)
          let $state := p:shift(107, $input, $state)        (: 'encoding' :)
          let $state := p:lookahead1W(35, $input, $state)   (: StringLiteral | S^WS | ('(' ':') :)
          let $state := p:shift(12, $input, $state)         (: StringLiteral :)
          return $state
        else
          $state
      return $state
  let $state := p:lookahead1W(46, $input, $state)           (: S^WS | ('(' ':') | ';' :)
  let $state := p:parse-Separator($input, $state)
  return p:reduce($state, "VersionDecl", $count)
};

(:~
 : Parse Module.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-Module($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:lookahead1W(216, $input, $state)          (: Wildcard | EQName^Token | IntegerLiteral |
                                                               DecimalLiteral | DoubleLiteral | StringLiteral | S^WS |
                                                               '$' | '(' | '(#' | ('(' ':') | '+' | '-' | '.' | '..' |
                                                               '/' | '//' | '<' | '<!--' | '<?' | '@' | 'ancestor' |
                                                               'ancestor-or-self' | 'and' | 'ascending' | 'attribute' |
                                                               'case' | 'cast' | 'castable' | 'child' | 'collation' |
                                                               'comment' | 'count' | 'declare' | 'default' |
                                                               'descendant' | 'descendant-or-self' | 'descending' |
                                                               'div' | 'document' | 'document-node' | 'element' |
                                                               'else' | 'empty' | 'empty-sequence' | 'end' | 'eq' |
                                                               'every' | 'except' | 'following' | 'following-sibling' |
                                                               'for' | 'function' | 'ge' | 'group' | 'gt' | 'idiv' |
                                                               'if' | 'import' | 'instance' | 'intersect' | 'is' |
                                                               'item' | 'le' | 'let' | 'lt' | 'mod' | 'module' |
                                                               'namespace' | 'namespace-node' | 'ne' | 'node' | 'only' |
                                                               'or' | 'order' | 'ordered' | 'parent' | 'preceding' |
                                                               'preceding-sibling' | 'processing-instruction' |
                                                               'return' | 'satisfies' | 'schema-attribute' |
                                                               'schema-element' | 'self' | 'some' | 'stable' | 'start' |
                                                               'switch' | 'text' | 'to' | 'treat' | 'try' |
                                                               'typeswitch' | 'union' | 'unordered' | 'validate' |
                                                               'where' | 'xquery' :)
  let $state :=
    if ($state[$p:l1] = 192) then                           (: 'xquery' :)
      let $state := p:lookahead2W(167, $input, $state)      (: EOF | S^WS | '!=' | '#' | '(' | ('(' ':') | '*' | '+' |
                                                               ',' | '-' | '/' | '//' | '<' | '<<' | '<=' | '=' | '>' |
                                                               '>=' | '>>' | '[' | 'and' | 'cast' | 'castable' | 'div' |
                                                               'encoding' | 'eq' | 'except' | 'ge' | 'gt' | 'idiv' |
                                                               'instance' | 'intersect' | 'is' | 'le' | 'lt' | 'mod' |
                                                               'ne' | 'or' | 'to' | 'treat' | 'union' | 'version' | '|' :)
      return $state
    else
      ($state[$p:l1], subsequence($state, $p:lk + 1))
  let $state :=
    if ($state[$p:error]) then
      $state
    else if ($state[$p:lk] = 27584                          (: 'xquery' 'encoding' :)
          or $state[$p:lk] = 48320) then                    (: 'xquery' 'version' :)
      let $state := p:parse-VersionDecl($input, $state)
      return $state
    else
      $state
  let $state := p:lookahead1W(216, $input, $state)          (: Wildcard | EQName^Token | IntegerLiteral |
                                                               DecimalLiteral | DoubleLiteral | StringLiteral | S^WS |
                                                               '$' | '(' | '(#' | ('(' ':') | '+' | '-' | '.' | '..' |
                                                               '/' | '//' | '<' | '<!--' | '<?' | '@' | 'ancestor' |
                                                               'ancestor-or-self' | 'and' | 'ascending' | 'attribute' |
                                                               'case' | 'cast' | 'castable' | 'child' | 'collation' |
                                                               'comment' | 'count' | 'declare' | 'default' |
                                                               'descendant' | 'descendant-or-self' | 'descending' |
                                                               'div' | 'document' | 'document-node' | 'element' |
                                                               'else' | 'empty' | 'empty-sequence' | 'end' | 'eq' |
                                                               'every' | 'except' | 'following' | 'following-sibling' |
                                                               'for' | 'function' | 'ge' | 'group' | 'gt' | 'idiv' |
                                                               'if' | 'import' | 'instance' | 'intersect' | 'is' |
                                                               'item' | 'le' | 'let' | 'lt' | 'mod' | 'module' |
                                                               'namespace' | 'namespace-node' | 'ne' | 'node' | 'only' |
                                                               'or' | 'order' | 'ordered' | 'parent' | 'preceding' |
                                                               'preceding-sibling' | 'processing-instruction' |
                                                               'return' | 'satisfies' | 'schema-attribute' |
                                                               'schema-element' | 'self' | 'some' | 'stable' | 'start' |
                                                               'switch' | 'text' | 'to' | 'treat' | 'try' |
                                                               'typeswitch' | 'union' | 'unordered' | 'validate' |
                                                               'where' | 'xquery' :)
  let $state :=
    if ($state[$p:l1] = 139) then                           (: 'module' :)
      let $state := p:lookahead2W(165, $input, $state)      (: EOF | S^WS | '!=' | '#' | '(' | ('(' ':') | '*' | '+' |
                                                               ',' | '-' | '/' | '//' | '<' | '<<' | '<=' | '=' | '>' |
                                                               '>=' | '>>' | '[' | 'and' | 'cast' | 'castable' | 'div' |
                                                               'eq' | 'except' | 'ge' | 'gt' | 'idiv' | 'instance' |
                                                               'intersect' | 'is' | 'le' | 'lt' | 'mod' | 'namespace' |
                                                               'ne' | 'or' | 'to' | 'treat' | 'union' | '|' :)
      return $state
    else
      ($state[$p:l1], subsequence($state, $p:lk + 1))
  let $state :=
    if ($state[$p:lk] = 35979) then                         (: 'module' 'namespace' :)
      let $state := p:parse-LibraryModule($input, $state)
      return $state
    else if ($state[$p:error]) then
      $state
    else
      let $state := p:parse-MainModule($input, $state)
      return $state
  return p:reduce($state, "Module", $count)
};

(:~
 : Parse XQuery.
 :
 : @param $input the input string.
 : @param $state the parser state.
 : @return the updated parser state.
 :)
declare function p:parse-XQuery($input as xs:string, $state as item()+) as item()+
{
  let $count := count($state)
  let $state := p:lookahead1W(31, $input, $state)           (: EPSILON | S^WS | ('(' ':') :)
  let $state := p:parse-Module($input, $state)
  let $state := p:lookahead1W(32, $input, $state)           (: EOF | S^WS | ('(' ':') :)
  let $state := p:shift(1, $input, $state)                  (: EOF :)
  return p:reduce($state, "XQuery", $count)
};

(:~
 : Parse start symbol XQuery from given string.
 :
 : @param $s the string to be parsed.
 : @return the result as generated by parser actions.
 :)
declare function p:parse-XQuery($s as xs:string) as item()*
{
  let $state := p:parse-XQuery($s, (0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, false()))
  let $error := $state[$p:error]
  return
    if ($error) then
      element ERROR {$error/@*, p:error-message($s, $error)}
    else
      subsequence($state, $p:result)
};

(: End :)
